Hi, question: how do I pass additional linker options (extending the rpath) when building the shared versions of apr_ldap and apr_crypto_openssl? How do I specify that *before* running "configure?
My setup is as follows: there are locally built versions of "OpenSSL" and "OpenLDAP" installed on the build machine. OpenLDAP has been built using the local OpenSSL binaries. The RUNPATH of the libldap.so and liblber.so includes the installation path of the local OpenSSL. This to enforce that the *correct* version of OpenSSL is loaded at run-time. Now I am trying to build apr-util using these locally built libraries. My configure command looks like: apr-util-1.6.1> more config.nice #! /bin/sh # # Created by configure "./configure" \ "--prefix=/opt/msc_stuff/msc-smtool-collection/aprutils" \ "--with-crypto" \ "--with-apr=/opt/msc_stuff/msc-smtool-collection/aprutils" \ "--with-openssl=/opt/msc_stuff/msc-smtool-collection/openssl" \ "--with-ldap" \ "--with-ldap-include=/opt/msc_stuff/msc-smtool-collection/openldap/include" \ "--with-ldap-lib=/opt/msc_stuff/msc-smtool-collection/openldap/lib" \ "--with-expat=/opt/msc_stuff/msc-smtool-collection/expat" \ "$@" Running "make depend" and "make" go through. Then I do a "make test" and that fails, complaining about missing "libssl.so.1.1". Inspecting the "testall" binary shows: apr-util-1.6.1> ldd test/testall linux-vdso.so.1 (0x00007ffec9f09000) libaprutil-1.so.0 => /scratch/msc-devel/apr-util-1.6.1/.libs/libaprutil-1.so.0 (0x00007f308d31a000) libexpat.so.1 => /opt/msc_stuff/msc-smtool-collection/expat/lib/libexpat.so.1 (0x00007f308d0f0000) libapr-1.so.0 => /opt/msc_stuff/msc-smtool-collection/aprutils/lib/libapr-1.so.0 (0x00007f308ceb5000) librt.so.1 => /lib64/librt.so.1 (0x00007f308ccad000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f308ca72000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f308c855000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f308c651000) libldap-2.4.so.2 => /opt/msc_stuff/msc-smtool-collection/openldap/lib/libldap-2.4.so.2 (0x00007f308c409000) libssl.so.1.1 => not found libcrypto.so.1.1 => not found liblber-2.4.so.2 => /opt/msc_stuff/msc-smtool-collection/openldap/lib/liblber-2.4.so.2 (0x00007f308c1fa000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f308bfe3000) libc.so.6 => /lib64/libc.so.6 (0x00007f308bc42000) /lib64/ld-linux-x86-64.so.2 (0x00007f308d547000) libssl.so.1.1 => /opt/msc_stuff/msc-smtool-collection/openssl/lib/libssl.so.1.1 (0x00007f308b9a4000) libcrypto.so.1.1 => /opt/msc_stuff/msc-smtool-collection/openssl/lib/libcrypto.so.1.1 (0x00007f308b490000) apr-util-1.6.1> readelf -d test/testall | grep RUNP 0x000000000000001d (RUNPATH) Library runpath: [/scratch/msc-devel/apr-util-1.6.1/.libs:/opt/msc_stuff/msc-smtool-collection/expat/lib:/opt/msc_stuff/msc-smtool-collection/aprutils/lib:/opt/msc_stuff/msc-smtool-collection/openldap/lib] So it seems the path to OpenSSL is missing in the RUNPATH. The path to OpenLDAP (or Expat, also built locally) is there. Why the missing path? Unfortunately my knowledge about the whole libtool/autoconfig framework is very basic. So any suggestions on how to add the path to the build? I tried to set LDFLAGS before configure, but that did not help LDFLAGS="-L/opt/msc_stuff/msc-smtool-collection/openssl/lib -Wl,-rpath=/opt/msc_stuff/msc-smtool-collection/openssl/lib"; export LDFLAGS Thanks in advance Martin -- ------------------------------------------------------ Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de