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: Fri, 5 Nov 2004 17:40:39 +0100

On Fri, Nov 05, 2004 at 08:50:18AM +0100, Benoit PAPILLAULT wrote:
> Arwed von Merkatz a écrit :
> >>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.
>
> I did not know that functions can be added to the grimoire. So I rewrite
> my sentence:
> - do not modify sorcery or grimoire functions.
>
> Since you persist on your solution, here are few drawbacks:
> - /lib is hardcoded. So this fix will not correctly work on bi-arch or
> multi-arch platform.
Then give me the info that's needed to make the function work on those.

> - libc.so.6 is hardcoded. So this fix might not work on all platforms.
It works on all platforms we have, otherwise someone would have filed a
bug about it much earlier, those checks have been there for over a year.

> - hardcoded values are just leading to more bugs each time they changed.
That's why I made it a function, so it can easily be adjusted if it's
still needed when glibc changes again.

> - I think it should be "if grep -q NTPL /lib/libc.so.6; then". This code
> does not work. You've never tested it (even if perforce is out of date,
> someone commited at one time a non working, non tested code).
> So now, just tell me what's wrong with patching glibc and mysql spells
> (and other spells that might need it)? It's your turn :-)
Nothing is wrong with that, but fixing upstream software to work takes
time I don't have, and the way I did it works _now_. If someone takes
the time to fix the other software that needs the NPTL check right now
to work correctly (and sends that fix upstream), I'll happily remove the
function again.
That's the whole point of grimoire functions. They're dead easy to add
and easy to remove again, and they're always in sync with the grimoire
they're used in.

> I attached the code I read since perforce server has some problem right now.
>
> Benoit PAPILLAULT
>
> #---------------------------------------------------------------------
> ## @return 0 if glibc was compiled with NPTL
> ## @return 1 otherwise
> ##
> ## Detects if the current glibc includes NPTL support.
> ##
> #---------------------------------------------------------------------
> function glibc_is_nptl ()
> {
> if /lib/libc.so.6 | grep -q NPTL; then
> return 0
> fi
> if /lib/libc.so.6 | grep -q "Native POSIX Threads Library"; then
> return 0
> fi
> return 1
> }
>
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss
>

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




Archive powered by MHonArc 2.6.24.

Top of Page