Building agains dynamic libptread in Debian Stable

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


Hello,

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

ldd /usr/local/bin/gss-client returns:
     linux-gate.so.1 =>  (0xb7794000)
     libgssapi_krb5.so.2 => /usr/local/lib/libgssapi_krb5.so.2 (0xb7702000)
     libkrb5.so.3 => /usr/local/lib/libkrb5.so.3 (0xb764c000)
     libk5crypto.so.3 => /usr/local/lib/libk5crypto.so.3 (0xb7626000)
     libcom_err.so.3 => /usr/local/lib/libcom_err.so.3 (0xb7623000)
     libkrb5support.so.0 => /usr/local/lib/libkrb5support.so.0 (0xb761c000)
     libresolv.so.2 => /lib/i686/cmov/libresolv.so.2 (0xb7603000)
     libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb75ff000)
     libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb74b7000)
     /lib/ld-linux.so.2 (0xb7795000)

I've seen that the pre-compiled Ubuntu packages are linked against 
libpthread.so. I need it in order to be able to load a GSS mechanism 
which requires this dependency to be satisfied (the mechanism is 
mech_eap.so 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.

Regards,
Alejandro


More information about the krbdev mailing list