cURL / Mailing Lists / curl-library / Single Mail

curl-library

RPATH incorrect with custom SSL builds and 7.19.4

From: Quanah Gibson-Mount <quanah_at_zimbra.com>
Date: Wed, 22 Apr 2009 14:28:41 -0700

After building Curl 7.19.4 and fixing the configure issue around using a
custom openssl build, I found that the resulting binary was not executable.
This is because the compiled in rpath is missing the path to the custom
build of OpenSSL:

[build_at_build01 .libs]$ readelf -d curl
 0x0000000f (RPATH) Library rpath:
[/opt/zimbra/curl-7.19.4/lib:/opt/zimbra/heimdal-1.2.1/lib]

The RPATH should also have included /opt/zimbra/openssl-0.9.8k/lib as it
did in previous releases.

The end result is:

[zimbra_at_freelancer bin]$ ./curl
./curl: error while loading shared libraries: libssl.so.0.9.8: cannot open
shared object file: No such file or directory

Even though the Heimdal libraries (since they are correctly built) find
their OpenSSL lib dependencies just fine.

[zimbra_at_freelancer bin]$ ldd curl
        libcurl.so.4 => /opt/zimbra/curl-7.19.4/lib/libcurl.so.4
(0x00002b6d55c1a000)
        libidn.so.11 => /usr/lib64/libidn.so.11 (0x00000032b3e00000)
        libssl.so.0.9.8 => not found
        librt.so.1 => /lib64/librt.so.1 (0x00000032b5200000)
        libgssapi.so.2 => /opt/zimbra/heimdal-1.2.1/lib/libgssapi.so.2
(0x00002b6d55e70000)
        libheimntlm.so.0 => /opt/zimbra/heimdal-1.2.1/lib/libheimntlm.so.0
(0x00002b6d5609f000)
        libkrb5.so.25 => /opt/zimbra/heimdal-1.2.1/lib/libkrb5.so.25
(0x00002b6d562a5000)
        libhx509.so.4 => /opt/zimbra/heimdal-1.2.1/lib/libhx509.so.4
(0x00002b6d56571000)
        libwind.so.0 => /opt/zimbra/heimdal-1.2.1/lib/libwind.so.0
(0x00002b6d567b5000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00000032b3a00000)
        libasn1.so.8 => /opt/zimbra/heimdal-1.2.1/lib/libasn1.so.8
(0x00002b6d569dd000)
        libcom_err.so.1 => /opt/zimbra/heimdal-1.2.1/lib/libcom_err.so.1
(0x00002b6d56c61000)
        libcrypto.so.0.9.8 => not found
        libroken.so.18 => /opt/zimbra/heimdal-1.2.1/lib/libroken.so.18
(0x00002b6d56e65000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00000032b5e00000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00000032b7200000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00000032b4a00000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00000032b4200000)
        libc.so.6 => /lib64/libc.so.6 (0x00000032b3600000)
        libssl.so.0.9.8 => /opt/zimbra/openssl-0.9.8k/lib/libssl.so.0.9.8
(0x00002b6d5707a000)
        libcrypto.so.0.9.8 =>
/opt/zimbra/openssl-0.9.8k/lib/libcrypto.so.0.9.8 (0x00002b6d572c6000)
        /lib64/ld-linux-x86-64.so.2 (0x00000032b3200000)

--Quanah

--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration
Received on 2009-04-22