-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
Harfbuzz's CMake config uses the wrong path #180054
Labels
0.kind: bug
Something is broken
Comments
This comment was marked as outdated.
This comment was marked as outdated.
2xsaiko
added a commit
to 2xsaiko/harfbuzz
that referenced
this issue
Oct 26, 2022
When includedir is set to an absolute path, the previous code appends that absolute path to ${prefix}, which results in a wrong path. The right behavior would be in this case to drop ${prefix} and just use the absolute path. This is an issue in nixpkgs, where includedir is set to the final (absolute) path of the built library in the Nix store. See NixOS/nixpkgs#180054.
2xsaiko
added a commit
to 2xsaiko/harfbuzz
that referenced
this issue
Oct 26, 2022
When includedir or libdir are set to an absolute path, the previous code appends that absolute path to ${prefix}, which results in a wrong path. The right behavior would be in this case to drop ${prefix} and just use the absolute path. This is an issue in nixpkgs, where includedir is set to the final (absolute) path of the built library in the Nix store. See NixOS/nixpkgs#180054.
This comment was marked as outdated.
This comment was marked as outdated.
2xsaiko
added a commit
to 2xsaiko/harfbuzz
that referenced
this issue
Oct 26, 2022
The previous code concatenates includedir to _harfbuzz_prefix verbatim, which results in a wrong resulting include path in case includedir is an absolute path. The right behavior would be in this case to drop _harfbuzz_prefix and just use the absolute path which this implements using cmake_path(APPEND). This is an issue in nixpkgs, where includedir is set to the final (absolute) path of the built library in the Nix store, which causes CMake projects depending on harfbuzz to not configure. See NixOS/nixpkgs#180054. NB: cmake_path is a function introduced in CMake 3.20, while harfbuzz's CMakeLists.txt currently specifies 3.12.
2xsaiko
added a commit
to 2xsaiko/harfbuzz
that referenced
this issue
Oct 26, 2022
The previous code concatenates includedir to _harfbuzz_prefix verbatim, which results in a wrong resulting include path in case includedir is an absolute path. Instead, we can let meson determine the absolute include and lib paths in advance and save them in the cmake config. This is an issue in nixpkgs, where includedir is set to the final (absolute) path of the built library in the Nix store, which causes CMake projects depending on harfbuzz to not configure. See NixOS/nixpkgs#180054.
2xsaiko
added a commit
to 2xsaiko/harfbuzz
that referenced
this issue
Oct 26, 2022
The previous code concatenates includedir to _harfbuzz_prefix verbatim, which results in a wrong resulting include path in case includedir is an absolute path. Instead, we can let meson determine the absolute include and lib paths in advance and save them in the cmake config. This is an issue in nixpkgs, where includedir is set to the final (absolute) path of the built library in the Nix store, which causes CMake projects depending on harfbuzz to not configure. See NixOS/nixpkgs#180054.
2xsaiko
added a commit
to 2xsaiko/harfbuzz
that referenced
this issue
Oct 26, 2022
The previous code concatenates includedir to _harfbuzz_prefix verbatim, which results in a wrong final include path in case includedir is an absolute path. Instead, we can let meson determine the absolute include and lib paths in advance and save them in the cmake config. This is an issue in nixpkgs, where includedir is set to the final (absolute) path of the built library in the Nix store, which causes CMake projects depending on harfbuzz to not configure. See NixOS/nixpkgs#180054.
Fixed in harfbuzz 6.0.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Trying to use harfbuzz in a CMake project, CMake fails with the following:
That path comes from /nix/store/7ahz2g1i3m2pfk96fjl6j37ldcwlxpbg-harfbuzz-3.3.2-dev/lib/cmake/harfbuzz/harfbuzz-config.cmake, probably on line 25 which says
set(_harfbuzz_includedir "${prefix}//nix/store/7ahz2g1i3m2pfk96fjl6j37ldcwlxpbg-harfbuzz-3.3.2-dev/include")
.Steps To Reproduce
Steps to reproduce the behavior:
cmake .
)Expected behavior
The project configures successfully.
Notify maintainers
@edolstra
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: