-
Notifications
You must be signed in to change notification settings - Fork 565
Open
Labels
Description
Steps to reproduce the issue
When the rocm distribution of llvm (llvm-amdgpu) is installed on the system, it is automatically picked up as a spack compiler. Then it is automatically used as an external dependency when building anything with that version of hip/rocm. The hipify-clang package fails to build against this external llvm-amdgpu due to a cmake error in finding ClangConfig.cmake (even if the file is installed). This causes failure to build hip and any packages that depend on hip. This is a significant problem because it is difficult to prevent spack from finding the external llvm-amdgpu and configuring it as a compiler.
Here is a docker reproducer:
FROM rockylinux:9
RUN dnf -y group install development
RUN dnf -y install git gfortran dnf-plugins-core && \
dnf config-manager --add-repo https://repo.radeon.com/amdgpu/7.0.2/rhel/9.4/main/x86_64/ && \
dnf config-manager --add-repo https://repo.radeon.com/rocm/rhel9/7.0.2/main/ && \
dnf -y --enablerepo=crb install --nogpgcheck amdgpu-dkms rocm rocm-llvm-devel
RUN git clone https://github.com/spack/spack /tmp/spack
RUN source /tmp/spack/share/spack/setup-env.sh && \
spack env activate --temp && \
spack add hipify-clang@7.0.2 && \
spack install -j8 -p4 --fail-fastError message
Error message
1 error found in build log:
14 -- Detecting CXX compile features - done
15 -- HIPIFY config:
16 -- - Build hipify-clang : ON
17 -- - Test hipify-clang : OFF
18 -- - Is part of HIP SDK : OFF
19 -- - Install clang headers : ON
>> 20 CMake Error at CMakeLists.txt:41 (find_package):
21 Could not find a package configuration file provided by "Clang" wi
th any of
22 the following names:
23
24 ClangConfig.cmake
25 clang-config.cmake
26
See build log for details:
/tmp/jenkins/spack-stage/spack-stage-hipify-clang-6.4.3-nmnplbiszrwpobw7koemz6fvqxp5yazr/spack-build-out.txt
==> Warning: Skipping build of hip-6.4.3-akmuic6ezitgipc7k63ra7zjaqtv6dwu since hipify-clang-6.4.3-nmnplbiszrwpobw7koemz6fvqxp5yazr failed
Information on your system
- Spack: 1.2.0.dev0 (spack/spack@d6df756)
- Builtin repo: 4c6a3d0
- Python: 3.9.18
- Platform: linux-rocky9-skylake_avx512
Additional information
@afzpatel
@renjithravindrankannath
@srekolam
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have run
spack maintainers <name-of-the-package>and @mentioned any maintainers - I have uploaded the build log and environment files
- I have searched the issues of this repo and believe this is not a duplicate
Reactions are currently unavailable