Skip to content
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

Clang Issue Fix - Set clang as default CXX Compiler #137

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

kiritigowda
Copy link
Collaborator

  • Set clang as default CXX Compiler

@kiritigowda
Copy link
Collaborator Author

kiritigowda commented Feb 7, 2023

@rrawther

This PR fails on RedHat & SLES due to missing Clang RT location in

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

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)
  • RedHat
HIP_CLANG_ROOT - /usr
HIP_CLANGRT_LIB_SEARCH_PATHS - 
HIP_CLANG_INCLUDE_PATH - HIP_CLANG_INCLUDE_PATH-NOTFOUND
  • Ubuntu
HIP_CLANG_ROOT - /usr/lib/llvm-14
HIP_CLANGRT_LIB_SEARCH_PATHS - 
HIP_CLANG_INCLUDE_PATH - /usr/lib/llvm-14/lib/clang/14.0.0/include

@kiritigowda kiritigowda merged commit 4c720ff into ROCm:master Feb 11, 2023
@kiritigowda kiritigowda deleted the kg/clang-fix branch February 11, 2023 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants