-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
hip: fix cmake installation directories #197838
Conversation
Result of 2 packages built:
|
Builds but not sure how to test blender properly so can't really properly review it. |
The only real change is making sure the symlinks in ${hip}/hip correctly point to their corresponding directories in the root folder. |
@@ -154,6 +154,9 @@ stdenv.mkDerivation rec { | |||
"-DHIP_COMMON_DIR=${hip}" | |||
"-DROCCLR_PATH=${rocclr}" | |||
"-DHIP_VERSION_BUILD_ID=0" | |||
"-DCMAKE_INSTALL_BINDIR=bin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be ideally fixed upstream, see https://github.com/jtojnar/cmake-snips#assuming-cmake_install_dir-is-relative-path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upstream hip or upstream cmake?
This doesn't seem to happen with all roc* projects (rocprim, hipcub), but I have observed 3 others create ${nix_path}/${package_name}/${nix_path}
.
For hip, this seems to result in bad symlinks instead.
The problem seems to be nix-specific in that we use /nix/store to store package roots, and amd's cmake projects in particular end up taking the full path instead of a relative path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hip, they are making incorrect assumptions:
- https://github.com/ROCm-Developer-Tools/hipamd/blob/928684dfed0fb4a8a14c6d5d79014324f3218d82/CMakeLists.txt#L44
- https://github.com/ROCm-Developer-Tools/hipamd/blob/928684dfed0fb4a8a14c6d5d79014324f3218d82/CMakeLists.txt#L280-L282
- https://github.com/ROCm-Developer-Tools/hipamd/blob/928684dfed0fb4a8a14c6d5d79014324f3218d82/CMakeLists.txt#L363-L364
- https://github.com/ROCm-Developer-Tools/hipamd/blob/928684dfed0fb4a8a14c6d5d79014324f3218d82/CMakeLists.txt#L475
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an issue for now. ROCm/hipamd#55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, hip works for me with the patch and the dangling symlinks arer gone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, should add a comment mentioning the upstream issue so we remember to remove those once it's fixed.
Hold off on merging while I investigate just disabling |
This is okay to merge again, as unfortunately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM
Description of changes
Tracking: #197885
Turns out any
${hip}/hip
paths were turning into${hip}/${hip}
paths in hip-config.cmake.This fixes that, and removed the need for the workaround on my other PRs.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes