Fix the library installation directory
ClosedPublic

Authored by mgallien on Sep 30 2018, 7:35 PM.

Details

Summary

I believe the library install path is erroneous in version 0.3. The library installs in /usr/usr/lib64/elisa instead of /usr/lib64/elisa.
This patch fix this by removing the extraneous ${CMAKE_INSTALL_PREFIX} before ${LIB_INSTALL_DIR} ir src/.CMakeLists.txt.

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rmauchin requested review of this revision.Sep 30 2018, 7:35 PM
rmauchin created this revision.

Thanks for taking care of that.
I am a bit lost at what is the cause of your problem.

I did the following tests on my development computer:

  • CMAKE_INSTALL_PREFIX set to /home/some/path and doing ninja install would install the elisaLib.so private library to /home/some/path/lib/x86_64-linux-gnu/elisa/libelisaLib.so.0.1;
  • adding DESTDIR=tmp ninja install would install in /tmp/home/some/path/lib/x86_64-linux-gnu/elisa/libelisaLib.so.0.1.

In my setup, without CMAKE_INSTALL_PREFIX, the install paths are wrong.

I will check the cmake documentation.

mgallien accepted this revision.Sep 30 2018, 8:30 PM

Forgot what I said. It looks like CMAKE_INSTALL_PREFIX may be unnecessary. I thought I needed it to get correct installation paths.
Sorry about my confusion.

This revision is now accepted and ready to land.Sep 30 2018, 8:30 PM

It might be caused by my default cmake parameters on my distro (Fedora):

/usr/bin/cmake \
        -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \
        -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \
        -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
        -DCMAKE_INSTALL_PREFIX:PATH=/usr \
        -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
        -DLIB_INSTALL_DIR:PATH=/usr/lib64 \
        -DSYSCONF_INSTALL_DIR:PATH=/etc \
        -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
%if "lib64" == "lib64" 
        -DLIB_SUFFIX=64 \
%endif 
        -DBUILD_SHARED_LIBS:BOOL=ON

This is automatically set so that LIB_INSTALL_DIR is /usr/lib64.

I have found a working solution. See my inline comment. Do you want me to push a fix or are you able to do it directly ?

src/CMakeLists.txt
354

The correct variable to use here is ${KDE_INSTALL_FULL_LIBDIR} . Sorry about the error.

Do you want me to push a fix or are you able to do it directly ?

Yes please do it, I don't think I'm able to push.

mgallien commandeered this revision.Oct 1 2018, 3:19 PM
mgallien edited reviewers, added: rmauchin; removed: mgallien.

I will update it and land it.

This revision now requires review to proceed.Oct 1 2018, 3:19 PM
mgallien updated this revision to Diff 42670.Oct 1 2018, 3:19 PM

use KDE_INSTALL_FULL_LIBDIR instead of the non working current solution

This revision was not accepted when it landed; it landed in state Needs Review.Oct 1 2018, 3:25 PM
This revision was automatically updated to reflect the committed changes.