Libelektra: Setting `CMAKE_INSTALL_PREFIX` Breaks `kdb`

Created on 18 Aug 2017  Â·  2Comments  Â·  Source: ElektraInitiative/libelektra

Steps to Reproduce

  1. Clone the repository
  2. Build and install Elektra

    mkdir build
    cd build
    cmake -GNinja -DCMAKE_INSTALL_PREFIX=/tmp/Elektra ..
    ninja install
    
  3. Add the binary directory of Elektra to PATH

    set -x PATH $PATH /tmp/Elektra/bin
    
  4. Run kdb

    kdb run_all
    

Expected Result

The command kdb executes various tests

Actual Result

The command prints the error messages below.

Linux

kdb: error while loading shared libraries: libelektratools.so.2: cannot open shared object file: No such file or directory

macOS

dyld: Library not loaded: @rpath/libelektratools.2.dylib
  Referenced from: /tmp/Elektra/bin/kdb
  Reason: image not found
fish: 'kdb run_all' terminated by signal SIGABRT (Abort)

System Information

  • Elektra Version: master

Log Files

bug build usability

All 2 comments

Thank you for reporting the problem!

Seems like a regular library location problem. (libelektratools has no special treatment, it is linked against kdb in the regular way. See ldd.) Libraries use LD_LIBRARY_PATH (might be different on Mac OS X) and not PATH. Please try to set this variable additionally.

Alternatively, you can try to follow the Troubleshooting guide in doc/INSTALL.md for a permanent fix.

Please report if this did not help.

Setting LD_LIBRARY_PATH seems to solve the problem. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markus2330 picture markus2330  Â·  3Comments

markus2330 picture markus2330  Â·  3Comments

markus2330 picture markus2330  Â·  3Comments

markus2330 picture markus2330  Â·  4Comments

mpranj picture mpranj  Â·  3Comments