You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and so can’t handle absolute paths in CMAKE_INSTALL_{BIN,INCLUDE,DATAROOT,MAN}DIR; the value of libdir is even more broken, as the FULL variable always contains an absolute path ... or it would, had CMakeLists.txt actually included GNUInstallDirs—right now it expands to the empty string (yay CMake). The former lead to broken .pc files on NixOS; the latter leads to broken .pc files everywhere. Same applies to prefix, which is unset and should probably be changed to CMAKE_INSTALL_PREFIX if anything.
(Libcork also has a similar issue, tracked at dcreager/libcork#173, though in the current version it looks a bit different compared to the obsolete vendored one.)
The text was updated successfully, but these errors were encountered:
alexshpilkin
changed the title
pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute
pkg-config file is broken when CMAKE_INSTALL_{BIN,INCLUDE,LIB,DATAROOT,MAN}DIR is absolute
May 18, 2022
What version of shadowsocks-libev are you using?
3.3.5 (but inspection confirms issue exists on master as well)
What operating system are you using?
Linux localhost 5.15.36 #1-NixOS SMP Wed Apr 27 12:39:02 UTC 2022 x86_64 GNU/Linux
What did you do?
Build shadowsocks-libev with CMake, setting the
CMAKE_INSTALL_*DIR
variables to absolute pathsWhat did you expect to see?
Working pkg-config files
What did you see instead?
includedir=${prefix}//nix/store/7c6m91v9q43jl61vc6fsj7wrzkwb2xkb-shadowsocks-libev-3.3.5/include
, etc.Extended description
The template in
cmake/shadowsocks-libev.pc.cmake
hasand so can’t handle absolute paths in
CMAKE_INSTALL_{BIN,INCLUDE,DATAROOT,MAN}DIR
; the value oflibdir
is even more broken, as theFULL
variable always contains an absolute path ... or it would, hadCMakeLists.txt
actually included GNUInstallDirs—right now it expands to the empty string (yay CMake). The former lead to broken .pc files on NixOS; the latter leads to broken .pc files everywhere. Same applies toprefix
, which is unset and should probably be changed toCMAKE_INSTALL_PREFIX
if anything.(Libcork also has a similar issue, tracked at dcreager/libcork#173, though in the current version it looks a bit different compared to the obsolete vendored one.)
See “Concatenating paths when building pkg-config files” for a thorough discussion of the problem and a suggested fix, or KDE’s extra-cmake-modules for a simpler approach.
The text was updated successfully, but these errors were encountered: