When using the amdclang compiler through a wrapper script called "clang", HIP's cmake throws an error because it cannot find libclang_rt.builtins.
I think the source of the error is in a combination of:
https://github.com/ROCm-Developer-Tools/hipamd/blob/develop/hip-config.cmake.in
and https://github.com/ROCm-Developer-Tools/HIP/blob/develop/hip-lang-config.cmake.in
The reason that I am unsure is that the error is coming from this file in my system:
/opt/rocm-5.4.0/lib/cmake/hip/hip-config.cmake
The actual path to the library it's looking for on my system is
/opt/rocm-5.4.0/llvm/lib/clang/15.0.0/lib/linux/libclang_rt.builtins-x86_64.a
IMHO, resolving this issue properly requires defining and enforcing a consistent convention for rocm, llvm, and clang paths. These paths are a recurring issue in many components of rocm. A consistent convention stands to fix a lot of related troubles.
When using the amdclang compiler through a wrapper script called "clang", HIP's cmake throws an error because it cannot find libclang_rt.builtins.
I think the source of the error is in a combination of:
https://github.com/ROCm-Developer-Tools/hipamd/blob/develop/hip-config.cmake.in
andhttps://github.com/ROCm-Developer-Tools/HIP/blob/develop/hip-lang-config.cmake.in
The reason that I am unsure is that the error is coming from this file in my system:
/opt/rocm-5.4.0/lib/cmake/hip/hip-config.cmake
It contains both
and, later in the same file,
The actual path to the library it's looking for on my system is /opt/rocm-5.4.0/llvm/lib/clang/15.0.0/lib/linux/libclang_rt.builtins-x86_64.a
IMHO, resolving this issue properly requires defining and enforcing a consistent convention for rocm, llvm, and clang paths. These paths are a recurring issue in many components of rocm. A consistent convention stands to fix a lot of related troubles.