Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMG-Core: Fix GNUInstallDirs usage #226

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

OPNA2608
Copy link
Contributor

One may not manually prepend CMAKE_INSTALL_*DIR variables with CMAKE_INSTALL_PREFIX, because CMAKE_INSTALL_*DIR variables may already be absolute paths - inside or outside of CMAKE_INSTALL_PREFIX.

To get a guaranteed-absolute version of them, CMAKE_INSTALL_FULL_*DIR must be used.


Spotted in NixOS/nixpkgs#284124 (comment):

terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error' what():  filesystem error: recursive directory iterator cannot open directory: No such file or directory [/nix/store/zv4gsdpzdkpb3aynj3h9agk8wzzyrzj9-rmg-0.5.6//nix/store/zv4gsdpzdkpb3aynj3h9agk8wzzyrzj9-rmg-0.5.6/lib/RMG//Core] Aborted (core dumped)

I have left CORE_INSTALL_PREFIX incase you still need it somewhere in the future, though it will currently be unused.

One may not manually prepend `CMAKE_INSTALL_*DIR` variables with `CMAKE_INSTALL_PREFIX`, because `CMAKE_INSTALL_*DIR` variables
may already be absolute paths - inside *or* outside of `CMAKE_INSTALL_PREFIX`.

To get a guaranteed-absolute version of them, `CMAKE_INSTALL_FULL_*DIR` must be used.
@Rosalie241 Rosalie241 merged commit 685aa59 into Rosalie241:master Jan 28, 2024
2 checks passed
@Rosalie241
Copy link
Owner

Thank you for the patch, I apologize for the breakage and not reading the documentation correctly! There are always so many subtle things to watch out for ❤️

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