ROCmValidationSuite icon indicating copy to clipboard operation
ROCmValidationSuite copied to clipboard

lib64 vs lib

Open trixirt opened this issue 5 months ago • 1 comments

This is representative of a general problem https://github.com/ROCm/ROCmValidationSuite/blob/master/CMakeLists.txt#L63 On at least RHEL, Fedora, SUSE and OpenSUSE the library install location is lib64, not lib.

trixirt avatar Jul 26 '25 20:07 trixirt

I can confirm I faced this problem today with RHEL10 + EPEL10 packages. This patch fixed it:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8740ce85..55b26d62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,7 +56,7 @@ if(rocblas_FOUND)
   set(RVS_ROCBLAS_VERSION_MIN ${rocblas_VERSION_MINOR} )
   set(RVS_ROCBLAS_VERSION_PAT ${rocblas_VERSION_PATCH} )
   set(ROCBLAS_INC_DIR ${rocblas_INCLUDE_DIR} )
-  get_filename_component(ROCBLAS_LIB_DIR "${ROCBLAS_INC_DIR}/../lib" ABSOLUTE)
+  get_filename_component(ROCBLAS_LIB_DIR "${ROCBLAS_INC_DIR}/../lib64" ABSOLUTE)
 
   if( (RVS_ROCBLAS_VERSION_MAJ GREATER 999) OR (RVS_ROCBLAS_VERSION_MIN GREATER 999) OR (RVS_ROCBLAS_VERSION_PAT GREATER 999) )
     message(FATAL_ERROR "RVS rocblas: Too big ROCBLAS version number(s)" )
@@ -89,7 +89,7 @@ if(hsa-runtime64_FOUND)
   message(STATUS "hsa-runtime64 found")
   get_target_property(HSA_INC_DIR hsa-runtime64::hsa-runtime64 INTERFACE_INCLUDE_DIRECTORIES)
   get_filename_component(HSA_PATH "${HSA_INC_DIR}/.." ABSOLUTE)
-  get_filename_component(HSA_LIB_DIR "${HSA_PATH}/lib" ABSOLUTE)
+  get_filename_component(HSA_LIB_DIR "${HSA_PATH}/lib64" ABSOLUTE)
   set(ROCR_INC_DIR ${HSA_INC_DIR})
   set(ROCR_LIB_DIR ${HSA_LIB_DIR})
 else() #If HSA not found

On the other hand, the script does not find the ROCR_LIB_DIR neither ROCBLAS_LIB_DIR passed as -D variables nor as environment variables (tried exporting them, setting them before the cmake command, but none of them worked)

olivergs avatar Sep 11 '25 10:09 olivergs