ROCm / hipBLASLt

hipBLASLt is a library that provides general matrix-matrix operations with a flexible API and extends functionalities beyond a traditional BLAS library
https://rocm.docs.amd.com/projects/hipBLASLt/en/latest/index.html
MIT License
49 stars 80 forks source link

build with address-sanitizer option seens failing with combination of cc compiler and shared-libasan #848

Open jdgh000 opened 3 months ago

jdgh000 commented 3 months ago

Without AS feature, build is ok but when enabled, seems failing with cc compiler which is not recognizing shared-libasan. tried setting CMAKE_CXX_COMPILER_ID=Clang but still same:

export CMAKE_CXX_COMPILER_ID=Clang ; sudo bash ./install.sh --address-sanitizer -cda gfx90a ...

-- Adding /home/nonroot/hipBLASLt/build/release/virtualenv to CMAKE_PREFIX_PATH -- The C compiler identification is GNU 11.4.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: /bin/cc -- Check for working C compiler: /bin/cc - broken CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message): The C compiler

"/bin/cc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/nonroot/hipBLASLt/build/release/CMakeFiles/CMakeScratch/TryCompile-5UNwBu

Run Build Command(s):/usr/bin/cmake -E env VERBOSE=1 /bin/gmake -f Makefile cmTC_9732e/fast && /bin/gmake  -f CMakeFiles/cmTC_9732e.dir/build.make CMakeFiles/cmTC_9732e.dir/build
gmake[1]: Entering directory '/home/nonroot/hipBLASLt/build/release/CMakeFiles/CMakeScratch/TryCompile-5UNwBu'
Building C object CMakeFiles/cmTC_9732e.dir/testCCompiler.c.o
/bin/cc   -fsanitize=address -shared-libasan  -o CMakeFiles/cmTC_9732e.dir/testCCompiler.c.o -c /home/nonroot/hipBLASLt/build/release/CMakeFiles/CMakeScratch/TryCompile-5UNwBu/testCCompiler.c
cc: error: unrecognized command-line option ‘-shared-libasan’; did you mean ‘-shared-libgcc’?
gmake[1]: *** [CMakeFiles/cmTC_9732e.dir/build.make:78: CMakeFiles/cmTC_9732e.dir/testCCompiler.c.o] Error 1
gmake[1]: Leaving directory '/home/nonroot/hipBLASLt/build/release/CMakeFiles/CMakeScratch/TryCompile-5UNwBu'
gmake: *** [Makefile:127: cmTC_9732e/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): build/release/virtualenv/lib64/python3.9/site-packages/Tensile/Source/CMakeLists.txt:31 (project)

-- Configuring incomplete, errors occurred!