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

CFEngine compilation will not add a rpath entry for LMDB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Unconfirmed
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Platform:
      Debian
    • Found in version (details):
      git branch 3.6.x
    • Steps to reproduce:
      Manual steps provided

      Description

      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:
      <pre>
      ./configure --prefix=/opt/cfengine --with-lmdb=/opt/lmdb --with-openssl=/opt/libressl --with-workdir=/var/cfengine
      </pre>

      which yields:
      <pre>
      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
      </pre>

      Until there, everything's OK !

      But after the build, I notice that the build cf-agent has the following RPATH (using objdump -x):
      <pre>
      RPATH /opt/cfengine/lib:/opt/libressl/lib:/lib
      </pre>

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

      No surprise:
      <pre>

      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
        </pre>

      Altering the RPATH manually like this:
      <pre>
      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
      </pre>

      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 ?

      Thanks!

      P.S.: Can you please add "3.6.x" to the "Found in version" Redmine custom field ?

        Attachments

        1. config.log
          530 kB
          Matthieu CERDA

          Activity

            People

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

              Dates

              • Created:
                Updated:

                Summary Panel