Bug #19785 4.0.27 source distro requires LinuxThreads on Linux
Submitted: 12 May 2006 19:44 Modified: 18 Jul 2007 18:37
Reporter: Paul Dubois Email Updates:
Status: Won't fix Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.0.27 OS:Linux (Gentoo Linux)
Assigned to: Joerg Bruehe CPU Architecture:Any

[12 May 2006 19:44] Paul Dubois
I tried compiling the 4.0.27 source distribution on Gentoo Linux
with glibc 2.4.  This glibc requires ntpl and does not have LinuxThreads
support.  configure fails as follows:

checking for atomic operations... atomic_add atomic_sub
checking if we should use pstack... no
checking for int8... no
checking "LinuxThreads"... "Not found"
configure: error: This is a linux system and Linuxthreads was not
found. On linux Linuxthreads should be used.  Please install Linuxthreads
(or a new glibc) and try again.  See the Installation chapter in the
Reference Manual for more information.

I'm using gcc 3.4.6, but I think that doesn't matter. It was the upgrade
to ntpl-only glibc that caused the breakage.

How to repeat:
See above.
[18 May 2006 19:25] Joerg Bruehe
Starting from 4.1, MySQL can be configured and built using "NPTL".
In 4.0, "configure" checks for "Linuxthreads".

When support for NPTL was added, 4.0 was considered "too stable" to receive this change, so it was made for 4.1 (and up) only.
So that change was done to 4.1.12 and 5.0.6, see bug#2173.
I assume this decision is now even more valid than it was back then.

There are two workarounds which should enable 4.0 to build on a NPTL-only system:
1) Insert a misleading comment into the header file defining thread functions:
      echo '/* Linuxthreads */' >> /usr/include/pthread.h
   (The check just goes by searching that string.)
2) Explicitly give a threads library:
      ./configure --with-pthread --with-named-thread-lib=-lpthread ...
   (This takes precedence over the checks.)

Does that fulfill your needs ?
[18 Jun 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[18 Jul 2007 18:37] Joerg Bruehe
No need to change anything of this (low) severity in 4.0