Affects Version/s: None
Fix Version/s: None
Component/s: Building and Installing
I tried for testing purpose to build CFEngine with two specific constraints:
- OpenSSL (actually LibreSSL) is in /opt/libressl
- LMDB is in /opt/lmdb
My configure line is as follows:
./configure --prefix=/opt/cfengine --with-lmdb=/opt/lmdb --with-openssl=/opt/libressl --with-workdir=/var/cfengine
Summary of options...
> Required libraries
-> OpenSSL: /opt/libressl
-> PCRE: default path
> Optional libraries
-> MySQL connector: disabled
-> PostgreSQL connector: disabled
-> DB: Lightning MDB: /opt/lmdb
-> libvirt: disabled
-> libacl: disabled
-> libxml2: disabled
-> User promises: PAM/user* tools
-> Enterprise extensions: Plugin or not included
-> Workdir: /var/cfengine
-> Masterdir: default
-> Inputdir: default
-> Logdir: /var/cfengine
-> Piddir: /var/cfengine
Until there, everything's OK !
But after the build, I notice that the build cf-agent has the following RPATH (using objdump -x):
So, /opt/libressl is correct and has been appended as expected, but no /opt/lmdb...
/var/cfengine/bin/cf-agent: error while loading shared libraries: liblmdb.so: cannot open shared object file: No such file or directory
Altering the RPATH manually like this:
CFLAGS="-Wl,-rpath=/opt/lmdb/lib:/opt/libressl/lib -L/opt/lmdb/lib -L/opt/libressl/lib" LDCONFIG=$CFLAGS ./configure --prefix=/opt/cfengine --with-lmdb=/opt/lmdb --with-openssl=/opt/libressl --with-workdir=/var/cfengine
Gives "RPATH /opt/lmdb/lib:/opt/libressl/lib:/opt/cfengine/lib:/lib" which is OK and leads to a working cf-agent without having to fiddle with ld caching.
Is it possible to have the same behavior for LMDB than we have with OpenSSL ?
P.S.: Can you please add "3.6.x" to the "Found in version" Redmine custom field ?