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

allow absolute CMAKE_INSTALL_*DIR #2134

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

chayleaf
Copy link
Contributor

@chayleaf chayleaf commented Aug 5, 2023

This patch fixes Capstone build on NixOS (assuming next is v6, this PR should be backported to v5 as well).

NixOS's build infrastructure sets CMAKE_INSTALL_{LIB,INCLUDE}DIR to absolute paths. Fedora used to do this until 2012, but doesn't set it at all anymore. If you append it to ${prefix}, you get the wrong path. NixOS automatically detects it and links this issue: NixOS/nixpkgs#144170

The other uses of CMAKE_INSTALL_{LIB,INCLUDE}DIR shouldn't be an issue.

This patch fixes Capstone 5 build on NixOS.

NixOS's build infrastructure sets CMAKE_INSTALL_{LIB,INCLUDE}DIR to
absolute paths. If you append it to ${prefix}, you get the wrong path.
NixOS automatically detects it and links this issue:
NixOS/nixpkgs#144170
@chayleaf chayleaf changed the title capstone.pc.in: allow absolute CMAKE_INSTALL_*DIR allow absolute CMAKE_INSTALL_*DIR Aug 5, 2023
@XVilka XVilka mentioned this pull request Aug 4, 2023
24 tasks
@XVilka
Copy link
Contributor

XVilka commented Aug 5, 2023

Added it to #2081

@kabeor
Copy link
Member

kabeor commented Aug 9, 2023

Thanks, Merged!

@kabeor kabeor merged commit 36c5eef into capstone-engine:next Aug 9, 2023
11 checks passed
kabeor pushed a commit to kabeor/capstone that referenced this pull request Aug 21, 2023
This patch fixes Capstone 5 build on NixOS.

NixOS's build infrastructure sets CMAKE_INSTALL_{LIB,INCLUDE}DIR to
absolute paths. If you append it to ${prefix}, you get the wrong path.
NixOS automatically detects it and links this issue:
NixOS/nixpkgs#144170
kabeor added a commit that referenced this pull request Aug 21, 2023
* Add Python bindings for WASM

* Update Python bindings for m68k

* Update Python bindings for mos65xx

* Update Python bindings for x86

* Add Python bindings for SH

* Update CS_* constants in Python bindings

* Update constants from ARM auto-sync patch

* Fixing TriCore disasm instructions (#2088)

* allow absolute CMAKE_INSTALL_*DIR (#2134)

This patch fixes Capstone 5 build on NixOS.

NixOS's build infrastructure sets CMAKE_INSTALL_{LIB,INCLUDE}DIR to
absolute paths. If you append it to ${prefix}, you get the wrong path.
NixOS automatically detects it and links this issue:
NixOS/nixpkgs#144170

---------

Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
Co-authored-by: Bastian Koppelmann <bkoppelmann@users.noreply.github.com>
Co-authored-by: chayleaf <chayleaf@protonmail.com>
kabeor added a commit that referenced this pull request Aug 21, 2023
* Add Python bindings for WASM

* Update Python bindings for m68k

* Update Python bindings for mos65xx

* Update Python bindings for x86

* Add Python bindings for SH

* Update CS_* constants in Python bindings

* Update constants from ARM auto-sync patch

* Fixing TriCore disasm instructions (#2088)

* allow absolute CMAKE_INSTALL_*DIR (#2134)

This patch fixes Capstone 5 build on NixOS.

NixOS's build infrastructure sets CMAKE_INSTALL_{LIB,INCLUDE}DIR to
absolute paths. If you append it to ${prefix}, you get the wrong path.
NixOS automatically detects it and links this issue:
NixOS/nixpkgs#144170

* Disable swift binding const generate

* update bindings const

* update capstone version

* update ChangeLog

---------

Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
Co-authored-by: Bastian Koppelmann <bkoppelmann@users.noreply.github.com>
Co-authored-by: chayleaf <chayleaf@protonmail.com>
@mrexodia
Copy link
Contributor

mrexodia commented Aug 8, 2024

This PR breaks a fundamental assumption of CMake packages, which is that they are independent of the absolute folder they are installed in...

@mrexodia
Copy link
Contributor

mrexodia commented Aug 8, 2024

Just to add the relevant snippet from the GNUInstallDirs documentation:

These variables shouldn't be used in install() commands as they do not work with the cmake --install command's --prefix option, or with the cpack installer generators.

@Rot127 Rot127 modified the milestones: v5.0.3, v6 Aug 10, 2024
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.

5 participants