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

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

Open
jdgh000 opened this issue Jun 19, 2024 · 2 comments

Comments

@jdgh000
Copy link

jdgh000 commented Jun 19, 2024

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!

@ppanchad-amd
Copy link

Hi @jdgh000. Internal ticket has been created to investigate your issue. Thanks!

@darren-amd
Copy link
Contributor

Hi @jdgh000,

I was able to reproduce your issue on an older version of the repo, but found that your issue was fixed with this commit: Compiler Change that changed the default compiler from hipcc to directly calling amdclang++. This issue no longer appears on the latest version of the branch, please pull the latest version, build as ./install.sh --address-sanitizer -cda gfx90a and let me know if the issue persists, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants