Package: krb5 Version; 1.4.3-2 Severity: important Hi,
thanks for applying the POSIX portability patch. However, it has now turned up that there is another problem with pthread support, I am sorry we did not catch this earlier: Automatic build of krb5_1.4.3-2 on beethoven by sbuild/hurd-i386 69 Build started at 20051201-1731 ****************************************************************************** [...] ** Using build dependencies supplied by package: Build-Depends: libncurses5-dev, docbook-to-man, debhelper (>= 4.1.16), byacc | bison, comerr-dev (>= 2.0-1.33-2), ss-dev, texinfo (> 4.1) [...] Checking correctness of source dependencies... Toolchain package versions: libc0.3-dev_2.3.5-6 gcc-4.0_4.0.2-4 g++-4.0_4.0.2-4 binutils_2.16.1-2 libstdc++6-4.0-dev_4.0.2-4 libstdc++6_4.0.2-4 ------------------------------------------------------------------------------ dpkg-source: extracting krb5 in krb5-1.4.3 dpkg-source: unpacking krb5_1.4.3.orig.tar.gz dpkg-source: applying /org/buildd/build/krb5_1.4.3-2.diff.gz dpkg-buildpackage: source package is krb5 dpkg-buildpackage: source version is 1.4.3-2 dpkg-buildpackage: host architecture hurd-i386 [...] debian/rules build dh_testdir mkdir build find src -name configure -print | xargs touch find src \( -name \*hin -o -name \*.h.in -o -name \*.stmp \) -print \ | xargs touch cd build && ../src/configure --prefix=/usr --enable-shared \ --with-system-et --with-system-ss --enable-fakeka \ CFLAGS="-g -O2 -D_REENTRANT" --localstatedir=/etc \ --mandir=/usr/share/man --without-tcl configure: creating cache ./config.cache [...] configure: enabling thread support checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... no checking whether pthreads work with -pthreads... no checking whether pthreads work with -mthreads... no checking for the pthreads library -lpthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for cc_r... gcc configure: PTHREAD_CC = gcc configure: PTHREAD_CFLAGS = configure: PTHREAD_LIBS = -lpthread checking for pthread_once... no checking for pthread_mutexattr_setrobust_np... no checking for pthread_rwlock_init... no configure: rechecking with PTHREAD_... options checking for pthread_mutexattr_setrobust_np in -lc... no checking for pthread_rwlock_init in -lc... yes [...] cd build && /usr/bin/make all [...] making all in lib/rpc/unit-test... make[4]: Entering directory `/build/buildd/krb5-1.4.3/build/lib/rpc/unit-test' gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DKRB5_KRB4_COMPAT=1 -DHAVE_BT_RSEQ=1 -DKRB5_PRIVATE=1 -DKRB5_DEPRECATED=1 -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_LIBRESOLV=1 -DHAVE_RES_NINIT=1 -DHAVE_RES_NCLOSE=1 -DHAVE_RES_NSEARCH=1 -DHAVE_DN_SKIPNAME=1 -DHAVE_RES_SEARCH=1 -DHAVE_PRAGMA_WEAK_REF=1 -DDELAY_INITIALIZER=1 -DCONSTRUCTOR_ATTR_WORKS=1 -DDESTRUCTOR_ATTR_WORKS=1 -DENABLE_THREADS=1 -DHAVE_PTHREAD=1 -DHAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB=1 -DHAVE_REGCOMP=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DPOSIX_SIGNALS=1 -I../../../include -I../../../../src/lib/rpc/unit-test/../../../include -I../../../include/krb5 -I../../../../src/lib/rpc/unit-test/../../../include/krb5 -I. -g -O2 -D_REENTRANT -c ../../../../src/lib/rpc/unit-test/client.c gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DKRB5_KRB4_COMPAT=1 -DHAVE_BT_RSEQ=1 -DKRB5_PRIVATE=1 -DKRB5_DEPRECATED=1 -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_LIBRESOLV=1 -DHAVE_RES_NINIT=1 -DHAVE_RES_NCLOSE=1 -DHAVE_RES_NSEARCH=1 -DHAVE_DN_SKIPNAME=1 -DHAVE_RES_SEARCH=1 -DHAVE_PRAGMA_WEAK_REF=1 -DDELAY_INITIALIZER=1 -DCONSTRUCTOR_ATTR_WORKS=1 -DDESTRUCTOR_ATTR_WORKS=1 -DENABLE_THREADS=1 -DHAVE_PTHREAD=1 -DHAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB=1 -DHAVE_REGCOMP=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DPOSIX_SIGNALS=1 -I../../../include -I../../../../src/lib/rpc/unit-test/../../../include -I../../../include/krb5 -I../../../../src/lib/rpc/unit-test/../../../include/krb5 -I. -g -O2 -D_REENTRANT -c ../../../../src/lib/rpc/unit-test/rpc_test_clnt.c gcc -L../../../lib -g -O2 -D_REENTRANT -o client client.o rpc_test_clnt.o \ -lgssrpc -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lresolv ../../../lib/libgssapi_krb5.so: undefined reference to `_pthread_mutex_lock' ../../../lib/libgssapi_krb5.so: undefined reference to `_pthread_mutex_destroy' collect2: ld returned 1 exit status make[4]: *** [client] Error 1 make[4]: Leaving directory `/build/buildd/krb5-1.4.3/build/lib/rpc/unit-test' make[3]: *** [all-recurse] Error 1 make[3]: Leaving directory `/build/buildd/krb5-1.4.3/build/lib/rpc' make[2]: *** [all-recurse] Error 1 make[2]: Leaving directory `/build/buildd/krb5-1.4.3/build/lib' make[1]: *** [all-recurse] Error 1 make[1]: Leaving directory `/build/buildd/krb5-1.4.3/build' make: *** [build-stamp] Error 2 ****************************************************************************** Build finished at 20051201-1757 FAILED [dpkg-buildpackage died] So, it appears that configure detects alright that we need $PTHREAD_LIBS= -lpthread (this is different to GNU/Linux, as libpthread is a seperate library from libc on GNU/Hurd for the time being). However, it appears PTHREAD_LIBS never gets used anywhere in the Makefiles and consequently the link fails. I verified that libgssapi contains undefined pthread symbols, as dragged in through the `k5_mutex_lock' etc. functions I assume, so it should really link against libpthread in my opinion. Inspecting the upstream build systems, it appears they use ACX_PTHREAD from ac-archive to detect POSIX threads on the system, but then use operating-system specific overrides in configure.in for AIX, HPUX and Solaris to force the proper behaviour. GNU/Linux works fine as it does not need -lpthread, as I mentioned above, same for GNU/k*BSD apparently, as they use Linuxthreads as well. I would guess that krb5 builds fine on a vanilla BSD system, but I do not know how pthreads are handled there. One easy (and right, IMHO) thing to do would be exporting PTHREAD_LIBS to the Makefiles through config/pre.in (which only references PTHREAD_CFLAGS so far). I am not sure whether all the Makefile.in's should be modified to have $PTHREAD_LIBS added to the link lines in case the library uses pthread functions (or their k5_ equivalents) or whether we could get away with some hack like "[EMAIL PROTECTED]@ @PTHREAD_LIBS@" in config/pre.in, or something system-specific along the aix/hp-ux cases in configure.in, so I am not submitting any patches at this point. What do you guys think? cheers, Michael -- Michael Banck Debian Developer [EMAIL PROTECTED] http://www.advogato.org/person/mbanck/diary.html