After compiling 1.0.0, the apper binary gets the build-time path of libapper as RPATH, so it fails to run when installed on the system > apper apper: error while loading shared libraries: libapper_private.so: cannot open shared object file: No such file or directory > readelf -d /usr/bin/apper | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [/build/apper/src/build/libapper] Strangely, this only affects the apper binary, all other binaries/libraries have the correct RPATH even though the CMakeLists.txt code is similar: > LANG=C readelf -d /usr/lib/apper-pk-session | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib/apper] Using cmake 3.10.2, and compiling with -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_INSTALL_LIBEXECDIR=lib \ -DAPPSTREAM=ON
https://phabricator.kde.org/D10706
What is odd is that it works on my system
Git commit 448527f765b1c4f9dc5452cc069baddecaf55e7e by Antonio Rojas. Committed on 21/02/2018 at 12:57. Pushed by arojas into branch 'master'. Install apper binary as TARGET instead of PROGRAM Otherwise the RPATH set in add_target_properties is ignored Differential Revision: https://phabricator.kde.org/D10706 M +1 -1 Apper/CMakeLists.txt https://commits.kde.org/apper/448527f765b1c4f9dc5452cc069baddecaf55e7e