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: Benoit PAPILLAULT <benoit.papillault AT sourcemage.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] glibc and mysql 4.1.7
  • Date: Fri, 05 Nov 2004 08:50:18 +0100

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.
- libc.so.6 is hardcoded. So this fix might not work on all platforms.
- hardcoded values are just leading to more bugs each time they changed.
- 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 :-)

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
}





Archive powered by MHonArc 2.6.24.

Top of Page