ROCm / hipamd

35 stars 37 forks source link

RedHat & SLES - missing Clang RT Directory #60

Open kiritigowda opened 1 year ago

kiritigowda commented 1 year ago

RedHat & SLES

https://github.com/ROCm-Developer-Tools/hipamd/blob/474e8620099a463ad2ced821ae7400609b29bf7f/hip-config.cmake.in#L294

Missing Clang RT location in - /opt/rocm/hip/lib/cmake/hip/hip-config.cmake

CMake Error at /opt/rocm/hip/lib/cmake/hip/hip-config.cmake:331 (message):
  clangrt builtins lib not found
Call Stack (most recent call first):
  CMakeLists.txt:181 (find_package)

On RedHat

In file /opt/rocm/hip/lib/cmake/hip/hip-config.cmake the clang_rt.builtins library is located in/usr/lib64/clang/ and not in lib-- need to add directory structure for RedHat.

file(GLOB HIP_CLANGRT_LIB_SEARCH_PATHS "${HIP_CLANG_ROOT}/lib/clang/*/lib/*")
  find_library(CLANGRT_BUILTINS
    NAMES
      clang_rt.builtins
      clang_rt.builtins-x86_64
    PATHS
      ${HIP_CLANGRT_LIB_SEARCH_PATHS}
      ${HIP_CLANG_INCLUDE_PATH}/../lib/linux
      ${HIP_CLANG_INCLUDE_PATH}/../lib/windows
      NO_DEFAULT_PATH)
kiritigowda commented 1 year ago

Include -- /usr/lib64/clang/*/include/ Library -- /usr/lib64/clang/13.0.1/lib/