Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1853

CFEngine compilation will not add a rpath entry for LMDB



    • Type: Bug
    • Status: Unconfirmed
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:


      Hello there!

      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

      which yields:
      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):
      RPATH /opt/cfengine/lib:/opt/libressl/lib:/lib

      So, /opt/libressl is correct and has been appended as expected, but no /opt/lmdb...

      No surprise:

      1. /var/cfengine/bin/cf-agent
        /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 ?




            • Assignee:
              a10040 Kristian Amlie
              Kegeruneku Matthieu CERDA
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:

                Summary Panel