apr/apu-1-config default libdir breaks compilation against custom GSS-API

Bug #1358475 reported by Michael Osipov on 2014-08-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apr (Ubuntu)
apr-util (Ubuntu)

Bug Description

I am trying to build Subversion with serf against a newer version of MIT Kerberos which I have installed in $HOME/krb5. Everything else is from apt-get. A side note, MIT Kerberos is installed from apt-get too. There there are now two installations of MIT Kerberos.
serf from Subversion trunk, MIT Kerberos from Git master.

apr-1-config and apu-1-config spit out:

-L/usr/lib/i386-linux-gnu -lapr-1
-L/usr/lib/i386-linux-gnu -laprutil-1

Trying to compile serf against that local MIT Kerberos version gives me:
gcc -o test/serf_bwtp.o -c -std=c99 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -O2 -pthread -DNDEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DSERF_HAVE_GSSAPI -DMOCKHTTP_OPENSSL -I. -I/usr/include/apr-1.0 -I/usr/include -I/usr/include -I/home/mosipov/krb5/include test/serf_bwtp.c
gcc -o test/serf_bwtp -pthread -Wl,--enable-new-dtags -Wl,-rpath -Wl,/home/mosipov/krb5/lib -Wl,-rpath=/home/mosipov/Projekte/serf-read-only test/serf_bwtp.o -L. -L/usr/lib -L/usr/lib/i386-linux-gnu -L/home/mosipov/krb5/lib -lserf-2 -lssl -lcrypto -lz -lapr-1 -laprutil-1 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
/usr/lib/i386-linux-gnu/libgssapi_krb5.so: undefined reference to `k5_free_buf@krb5support_0_MIT'
/usr/lib/i386-linux-gnu/libkrb5.so: undefined reference to `k5_vset_error_fl@krb5support_0_MIT'
/usr/lib/i386-linux-gnu/libgssapi_krb5.so: undefined reference to `k5_buf_len@krb5support_0_MIT'
/usr/lib/i386-linux-gnu/libgssapi_krb5.so: undefined reference to `k5_buf_data@krb5support_0_MIT'
collect2: error: ld returned 1 exit status
scons: *** [test/serf_bwtp] Error 1
scons: building terminated because of errors.

-L/usr/lib/i386-linux-gnu comes before the custom MIT Kerberos path because APR/APU is processed first by the build script. GCC tries this libdir first and first of course a MIT Kerberos version which isn't compatible with the custom one.

Since /usr/lib/i386-linux-gnu is a default ld/ldd search dir, this should be removed from the config files to avoid override problems like this one.

Michael Osipov (michael-o) wrote :

$ uname -a
Linux mikamobil 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:31:42 UTC 2014 i686 i686 i686 GNU/Linux

Linux Mint 17

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers