LD_ASSUME_KERNEL questions
- From: psantoro <psantoro@xxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 09:49:45 -0500
Background
I'm using slackware 10.2 with kernel 2.4.32 and I'm building slackware firebird database packages (using official firebird binary build tar.gzs as a base, so I'm not compiling their code on my PC). I've read the following articles that discuss LD_ASSUME_KERNEL:
http://people.redhat.com/~drepper/assumekernel.html
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/cins_nptl.html
The multi-threaded version of firebird (super server) comes in two flavors: one uses linuxthreads and the other uses NPTL. The firebird documentation states that the linuxthreads version needs to have LD_ASSUME_KERNEL=2.2.5 set in the environment, when running with a kernel that supports NPTL. If I understand the above articles correctly, the linuxthreads version of the firebird super server requires the older fixed stack size linuxthreads library.
From the slackware 10.2 README.NPTL:
This version of Slackware contains support in glibc for NPTL (the Native
POSIX Thread Library). NPTL works with newer kernels (meaning 2.6.x, or
a 2.4 kernel that is patched to support NPTL, but not an unmodified
"vanilla" 2.4 kernel such as Slackware uses) to provide improved
performance for threads. [lines removed ...] For compatibility, the regular (linuxthreads) libraries are installed in /lib, and the new NPTL
versions are installed in /lib/tls. Which versions are used depends on
the kernel you're using. If it's newer than 2.6.4, then the NPTL
libraries in /lib/tls will be used.
Questions
1) In slackware 10.2 with 2.4.x kernel, "getconf GNU_LIBPTHREAD_VERSION" outputs "linuxthreads 0.10". How do I know if this is the newer floating stack version of linuxthreads or the older fixed stack size version? Are the two versions of linuxthreads (older fixed stack size or newer floating stack) compatible?
2) Since each DSO can tell the dynamic linker in glibc which minimum OS ABI version is needed (via ELF .note.ABI-tags), it appears that different linux distributions could (and probably do) use different ABI version requirements than that listed in point 4 of Ulrich Drepper's article. In RHL9, one of three threading libraries is used, depending on the kernel and the setting of LD_ASSUME_KERNEL. In slackware 10.2, one of two threading libraries is used, depending on the kernel and the setting of LD_ASSUME_KERNEL. From Ulrich Drepper's article, "In RHEL3 only two versions of glibc are needed, one using LinuxThreads and one using NPTL. The very old LinuxThreads code is not needed."
Am I correct that in the case of the linuxthreads version of firebird, setting "LD_ASSUME_KERNEL=2.2.5", could potentially load different linuxthreads libraries on different linux distributions?
(Linuxthreads version of firebird would use the fixed stack size version of linuxthreads in RHL9, but would use linuxthreads 0.10 in slackware 10.2 and the newer linuxthreads on RHEL3. Depending on the answer to my first question, this may or may not make a difference on slackware 10.2 -vs- RHL9 and RHL9 -vs- RHEL3.)
So shouldn't linux software vendor recommended LD_ASSUME_KERNEL settings be distribution specific?
Perhaps it's best to add code in my postinstall doinst.sh scripts to detect the GNU_LIBPTHREAD_VERSION and output a warning, if the user installed a version of firebird that does not match their kernel's threading capability and directs the user to install the correct version instead.
Thank you for your help,
Peter Santoro .
- Prev by Date: Re: evecv/memory leak
- Next by Date: Re: Newbie - Shared library
- Previous by thread: Re: Newbie - Shared library
- Index(es):
Relevant Pages
|