Linking Failure when building host/server/Nserver
Brought to you by:
bananajr
On system:
$uname -a
Linux allspice 2.4.28-allspice #1 SMP Thu Jan 13
23:44:30 EST 2005 i686 GNU/Linux
(Debian Sarge)
linking host/server/Nserver fails with:
/usr/X11R6/lib/libXt.a(Threads.o)(.text+0x52): In
function `InitProcessLock':
: undefined reference to `pthread_mutex_init'
/usr/X11R6/lib/libXt.a(Threads.o)(.text+0x89): In
function `InitProcessLock':
: undefined reference to `pthread_cond_init'
...
I resolved this issue by adding an
AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread",
echo "I need libpthread."; exit)
check to host/server/configure.in
I've attached a patch for the file which you should
test on platforms that don't require libpthread.
Patch for host/server/configure.in