Skip to content

Conversation

@GaetanLepage
Copy link
Contributor

@GaetanLepage GaetanLepage commented Apr 10, 2025

Follow recommendation from https://cmake.org/cmake/help/latest/command/install.html and make the destination path relative.

Use CMAKE_INSTALL_INCLUDEDIR instead of hardcoded include/ suffix.

Context: updating XRootD from 5.7.1 to 5.8.0 on nixpkgs.

This patch is causing our build to fail when installing the package:

Moving /nix/store/3zw12avd4c3h07a0rpl35jvqhv0gfx6l-xrootd-5.8.0-bin/bin/xrootd-config to /nix/store/6vnmipw8p1hc6cmkrsq9v1ay7j6iycq2-xrootd-5.8.0-dev/bin/xrootd-config
Running phase: fixupPhase
@nix { "action": "setPhase", "phase": "fixupPhase" }
Moving /nix/store/jbh4667k5zm74h9wv8y1j11x89cv6pnd-xrootd-5.8.0/include to /nix/store/6vnmipw8p1hc6cmkrsq9v1ay7j6iycq2-xrootd-5.8.0-dev/include
mv: cannot overwrite '/nix/store/6vnmipw8p1hc6cmkrsq9v1ay7j6iycq2-xrootd-5.8.0-dev/include/xrootd': Directory not empty

This PR fixes this issue by following CMake's recommendation to use relative paths in install's DESTINATIONs. substituting ${CMAKE_INSTALL_PREFIX}/include with ${CMAKE_INSTALL_INCLUDEDIR} in DESTINATION.

@GaetanLepage GaetanLepage force-pushed the fix-cmake branch 2 times, most recently from c236569 to b874ae8 Compare April 10, 2025 22:06
@amadio amadio added this to the 5.8.1 milestone Apr 11, 2025
Follow recommendation from
https://cmake.org/cmake/help/latest/command/install.html and make the
destination path relative
@amadio amadio self-requested a review April 11, 2025 07:49
@amadio amadio merged commit 6579e06 into xrootd:master Apr 11, 2025
11 checks passed
@GaetanLepage GaetanLepage deleted the fix-cmake branch April 11, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants