#236 Libraries are installed in $PREFIX/lib instead of $PREFIX/lib64 on Fedora 20 x86_64


Executing the usual build procedure with

sudo make install

will install the libraries in $PREFIX/lib instead of $PREFIX/lib64 on a 64-bit system (Fedora 20 x86_64).

Building an executable with

g++ -c itpp_test.cpp
g++ -O -o itpp_test itpp_test.o -lm -litpp

will work, but execution will fail with the following error:

error while loading shared libraries: libitpp.so.8: cannot open shared object file: No such file or directory

Copying the libraries to $PREFIX/lib64 resolves the error and the executable can run. Alternatively, the executable can be run with

LD_LIBRARY_PATH=$PREFIX/lib ./itpp_test

Both workarounds should not be necessary as the libraries should be installed in $PREFIX/lib64 on 64-bit systems.


  • Bogdan Cristea

    Bogdan Cristea - 2014-01-12
    • assigned_to: Bogdan Cristea
  • Bogdan Cristea

    Bogdan Cristea - 2014-01-12

    Indeed cmake can be told where to install IT++ depending on the target system: http://www.cmake.org/pipermail/cmake/2011-June/045092.html. However, on my AMD64 system with openSUSE 13.1, even if the library is installed in /usr/local/lib I don't have this issue.

  • Andreas Winkelbauer

    What is the output of

    cat /etc/ld.so.conf && cat /etc/ld.so.conf.d/*

    on your system?

  • Bogdan Cristea

    Bogdan Cristea - 2014-01-12

    include /etc/ld.so.conf.d/*.conf
    # /lib64, /lib, /usr/lib64 and /usr/lib gets added
    # automatically by ldconfig after parsing this file.
    # So, they do not need to be listed.

    Last edit: Bogdan Cristea 2014-01-12
  • Andreas Winkelbauer

    Yep, that's the difference. Here is the output I get on Fedora 20:

    include ld.so.conf.d/*.conf

    Hence, the 64-bit libraries must be placed in /usr/lib64 on this system.

  • Bogdan Cristea

    Bogdan Cristea - 2014-01-12

    Yes, it should be quite easy to modify cmake files, if you have some time please provide a patch. Otherwise I'll try to find some time ASAP.

  • Martin Hauke

    Martin Hauke - 2014-02-09

    Respect -DLIB_SUFFIX option to support proper "make install" on systems with lib64

    best regards,

  • Bogdan Cristea

    Bogdan Cristea - 2014-02-09

    Changes committed into master branch. Thanks for providing the patch

  • Bogdan Cristea

    Bogdan Cristea - 2014-02-09
    • status: open --> accepted

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks