[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vmware problem [LinuxThreads, NPTL]



On 04-Oct-06 17:53, Pete Harlan wrote:
> Do you know how I can compile a program that requires LinuxThreads?
> 
> Specifically, when running "configure" from the mysql source from
> mysql.com, it now fails with:
> 
>  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.

This is an upstream bug in mysql. I think this will be fixed upstream 
soon.

In the meantime, please try the attached patch (which is against 
mysql-dfsg-4.0.21).

> Is LinuxThreads available as a separate .deb, or compilable
> separately, or am I going to have to modify the source or compile my
> own glibc?

It has to be compiled together with glibc. Debian i386 has separate
full glibc versions one of which uses linuxthreads and the other uses
nptl. However, linuxthreads is a legacy kernel-2.4 thing and should be
avoided.

Regards
Andreas Jochens

diff -urN ../tmp-orig/mysql-dfsg-4.0.21/configure ./configure
--- ../tmp-orig/mysql-dfsg-4.0.21/configure	2004-10-01 14:22:20.900250208 +0200
+++ ./configure	2004-10-01 14:22:17.787723384 +0200
@@ -24953,18 +24953,10 @@
     else
       echo "$as_me:$LINENO: result: \"Not found\"" >&5
 echo "${ECHO_T}\"Not found\"" >&6
-      # If this is a linux machine we should barf
       if test "$IS_LINUX" = "true"
       then
-	{ { echo "$as_me:$LINENO: 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." >&5
-echo "$as_me: 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." >&2;}
-   { (exit 1); exit 1; }; }
+        # use nptl instead of linuxthreads
+        CFLAGS="$CFLAGS -DUSE_MUTEX_INSTEAD_OF_RW_LOCKS -DPTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP"
       else
 	echo "$as_me:$LINENO: checking \"DEC threads\"" >&5
 echo $ECHO_N "checking \"DEC threads\"... $ECHO_C" >&6
diff -urN ../tmp-orig/mysql-dfsg-4.0.21/configure.in ./configure.in
--- ../tmp-orig/mysql-dfsg-4.0.21/configure.in	2004-09-07 00:29:39.000000000 +0200
+++ ./configure.in	2004-10-01 14:22:10.295862320 +0200
@@ -1238,13 +1238,10 @@
       with_named_thread="-lpthread"
     else
       AC_MSG_RESULT("Not found")
-      # If this is a linux machine we should barf
       if test "$IS_LINUX" = "true"
       then
-	AC_MSG_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.])
+        # use nptl instead of linuxthreads
+        CFLAGS="$CFLAGS -DUSE_MUTEX_INSTEAD_OF_RW_LOCKS -DPTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP"
       else
 	AC_MSG_CHECKING("DEC threads")
         if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a



Reply to: