Closed j0sh closed 5 years ago
cc @nh2 (the maintainer?) since this issue probably slipped in under the radar
Uh, ugly. Thanks for pinging me.
This is not srt
specific, but seems like a common cmake
problem, see e.g.:
% git grep CMAKE_INSTALL_INCLUDEDIR
pkgs/applications/science/misc/root/5.nix: "-DCMAKE_INSTALL_INCLUDEDIR=include"
pkgs/applications/science/misc/root/default.nix: "-DCMAKE_INSTALL_INCLUDEDIR=include"
pkgs/applications/science/robotics/gazebo/default.nix: "-DCMAKE_INSTALL_INCLUDEDIR=include" ]
pkgs/desktops/lxqt/libqtxdg/default.nix: "-DCMAKE_INSTALL_INCLUDEDIR=include"
pkgs/development/compilers/hhvm/default.nix: # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
pkgs/development/compilers/hhvm/default.nix: cmakeFlags = "-DCMAKE_INSTALL_INCLUDEDIR=include";
pkgs/development/compilers/solc/patches/shared-libs-install.patch:+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libdevcore
pkgs/development/compilers/solc/patches/shared-libs-install.patch:+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libevmasm
pkgs/development/compilers/solc/patches/shared-libs-install.patch:+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libsolidity
pkgs/development/compilers/solc/patches/shared-libs-install.patch:+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libyul
pkgs/development/compilers/solc/patches/shared-libs-install.patch:+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liblangutil
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch:+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
pkgs/development/libraries/hyperscan/default.nix: --replace "includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" "includedir=@CMAKE_INSTALL_INCLUDEDIR@"
pkgs/development/libraries/ignition-math/default.nix: cmakeFlags="$cmakeFlags -DCMAKE_INSTALL_INCLUDEDIR=include -DCMAKE_INSTALL_LIBDIR=lib"
pkgs/development/libraries/srt/default.nix: # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
pkgs/development/libraries/srt/default.nix: "-DCMAKE_INSTALL_INCLUDEDIR=include"
pkgs/development/libraries/yder/fix-pkgconfig.patch:-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
pkgs/development/libraries/yder/fix-pkgconfig.patch:+includedir=@CMAKE_INSTALL_INCLUDEDIR@
pkgs/development/tools/build-managers/cmake/setup-hook.sh: cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputInclude}/include $cmakeFlags"
On the srt
side, it worked fine before upstream change https://github.com/Haivision/srt/pull/421/files because it was hardcoded before.
PR with fix for master
in #71669; should be backported to 19.09 afterwards.
@dtzWill I noticed you picked and then reverted it ^
Is there a better way to do this?
I still get this problem with many other packages.
Describe the bug After installing the srt module, the include path as shown by pkg-config is incorrect. The path is prefixed twice., eg
/path/to/srt//path/to/srt/include
To Reproduce Steps to reproduce the behavior:
pkg-config --cflags srt
Note that the prefix is included twice.
Inspecting the .pc file confirms this:
Expected behavior
The include path should be correct. In particular, the
includedir
shouldn't be doubled up.Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Metadata Please run
nix run nixpkgs.nix-info -c nix-info -m
and paste the result.Maintainer information: