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. |
There was a problem hiding this comment.
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.
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.
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
Flakebi
left a comment
There was a problem hiding this comment.
LGTM, hip works for me with the patch and the dangling symlinks arer gone.
LunNova
left a comment
There was a problem hiding this comment.
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 |
Description of changes
Tracking: #197885
Turns out any
${hip}/hippaths 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 = trueset 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.shto update generated release notes