Building agains dynamic libptread in Debian Stable

Alejandro Perez Mendez alex at
Mon Jul 9 09:00:08 EDT 2012


I have successfully compiled Kerberos in a Debian Stable. However, all 
the binaries are not dynamically linked against pthread library. For 

ldd /usr/local/bin/gss-client returns: =>  (0xb7794000) => /usr/local/lib/ (0xb7702000) => /usr/local/lib/ (0xb764c000) => /usr/local/lib/ (0xb7626000) => /usr/local/lib/ (0xb7623000) => /usr/local/lib/ (0xb761c000) => /lib/i686/cmov/ (0xb7603000) => /lib/i686/cmov/ (0xb75ff000) => /lib/i686/cmov/ (0xb74b7000)
     /lib/ (0xb7795000)

I've seen that the pre-compiled Ubuntu packages are linked against I need it in order to be able to load a GSS mechanism 
which requires this dependency to be satisfied (the mechanism is from project-moonshot). Of course I can modify the Makefile 
of the binary (e.g. gss-client) and add the "-lpthread" flag, but I'd 
like to know if there is a more elegant and automatic way to do it.

Config.log shows the following:
configure:5785: checking whether pthreads work with -pthread
configure:5868: gcc -o conftest -g -O2 -pthread   conftest.c -lresolv  >&5
configure:5868: $? = 0
configure:5877: result: yes
configure:5897: checking for joinable pthread attribute
configure:5910: gcc -o conftest -g -O2 -pthread   conftest.c -lresolv  >&5
configure:5910: $? = 0
configure:5942: result: PTHREAD_CREATE_JOINABLE
configure:5949: checking if more special flags are required for pthreads
configure:5956: result: no
configure:5968: checking for cc_r
configure:5996: result: gcc
configure:6029: PTHREAD_CC = gcc
configure:6031: PTHREAD_CFLAGS = -pthread
configure:6033: PTHREAD_LIBS =

I guess that this latter variable should take the "-lpthread" value, but 
I don't know why it is not working.


More information about the krbdev mailing list