Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] glibc and mysql 4.1.7

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Arwed von Merkatz <v.merkatz AT gmx.net>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] glibc and mysql 4.1.7
  • Date: Thu, 4 Nov 2004 17:46:54 +0100

On Thu, Nov 04, 2004 at 02:45:55PM +0100, Benoit PAPILLAULT wrote:
> Laurent Wandrebeck a écrit :
> >[big snip]
> >
> >>In my opinion the best solution to this is to reverse your change to the
> >>mysql spell and patch glibc to contain the string NPTL in that output.
> >>I'm just glad we didn't integrate that glibc into test yet, it'll break
> >>every spell that has to detect NPTL.
> >>The other solution would be to grep for the new string instead, fixing
> >>it in all spells. Though that would mean we would have to grep for both
> >>strings, as people don't necessarily have the latest glibc snapshot
> >>installed.
> >>Opinions, Suggestions?
> >>
> >
> >Don't you think /lib/libc.so.6 | egrep "(NPTL|Native\ POSIX\ Threads\
> >Library)" would be much cleaner ?
> >I don't think we should patch glibc for such a thing. It's up to sorcery
> >or spells to take care of it.
> >regards.
>
> I google a bit and found lots of answers to your problem.
>
> First of all, the original problem is that MySQL 4.1.7 does not properly
> detects and use NPTL. The bug has been reported to MySQL people (see :
> http://bugs.mysql.com/bug.php?id=2173). No clear patch has been proposed.
>
> However, one things is now clear. MySQL should detect NPTL by itself,
> not by a way which would be specific to a distro, like SourceMage
> GNU/Linux. So, all solutions proposing to changed sorcery or every other
> spell are clearly wrong and would not solve the original problem.

Of course the solution is to have MySQL people fix that bug, but that
doesn't help us, we still have to make our spells work on NPTL glibc,
and several other programs have such problems too. Basically, if there's
no fix upstream we have to fix it ourselves in any hackish way we see
fit.

> A similar bug has been reported by Debian people
> (http://bugs.mysql.com/bug.php?id=5871) and this bug report contains a
> patch against MySQL.
>
> Moreover, the proper way to detect NPTL versus linuxthreads is by
> checking the result of "getconf GNU_LIBPTHREAD_VERSION" which returns
> - "NPTL 0.61" on an NPTL-enabled system
> - "linuxthreads-0.10" on a linuxthreads system
> getconf is part of the glibc spell itself.
>
> However, the glibc-linuxthreads are buggy (they use ../nptl/Banner
> instead of ../linuxthreads/Banner) when computing the getconf strings.
> Debian sources clearly includes the following patch (see attachment)
> As a result, the getconf produced on SourceMage system returns an empty
> strings instead of "linuxthreads", but it works on NPTL-enabled system.
>
> Conclusion:
> - add the MySQL patch to the MySQL spell
> - add the glibc patch to the glibc spell (if needed)
> - do not modify sorcery for such things
No need at all to modify sorcery.
> - do not modify other spells
We have to. Several spells need to detect if there's a NPTL glibc on the
system since they will fail without modifications on such systems.

Anyway, the grimoire function exists now, so it's an easy fix.

--
Arwed v. Merkatz Source Mage GNU/Linux developer
http://www.sourcemage.org




Archive powered by MHonArc 2.6.24.

Top of Page