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++: error: unsupported option '-fsanitize=leak' for target 'x86_64-apple-darwin23.6.0' #33

Open
ClausKlein opened this issue Dec 13, 2024 · 0 comments

Comments

@ClausKlein
Copy link
Contributor

iMac:iterator_interface clausklein$ cmake --workflow gcc-debug --fresh
Executing workflow step 1 of 3: configure preset "gcc-debug"

Preset CMake variables:

  CMAKE_BUILD_TYPE="Debug"
  CMAKE_CXX_COMPILER="g++"
  CMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined"
  CMAKE_CXX_STANDARD="20"

-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ - broken
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCXXCompiler.cmake:73 (message):
  The C++ compiler

    "/usr/bin/g++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/Users/clausklein/Workspace/cpp/beman-project/iterator_interface/.build/gcc-debug/CMakeFiles/CMakeScratch/TryCompile-Yw8935'
    
    Run Build Command(s): /usr/local/bin/ninja -v cmTC_92a00
    [1/2] /usr/bin/g++   -fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined  -std=gnu++20 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacosx-version-min=14.7 -MD -MT CMakeFiles/cmTC_92a00.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_92a00.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_92a00.dir/testCXXCompiler.cxx.o -c /Users/clausklein/Workspace/cpp/beman-project/iterator_interface/.build/gcc-debug/CMakeFiles/CMakeScratch/TryCompile-Yw8935/testCXXCompiler.cxx
    FAILED: CMakeFiles/cmTC_92a00.dir/testCXXCompiler.cxx.o 
    /usr/bin/g++   -fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined  -std=gnu++20 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacosx-version-min=14.7 -MD -MT CMakeFiles/cmTC_92a00.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_92a00.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_92a00.dir/testCXXCompiler.cxx.o -c /Users/clausklein/Workspace/cpp/beman-project/iterator_interface/.build/gcc-debug/CMakeFiles/CMakeScratch/TryCompile-Yw8935/testCXXCompiler.cxx
    clang++: error: unsupported option '-fsanitize=leak' for target 'x86_64-apple-darwin23.6.0'
    ninja: build stopped: subcommand failed.
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:8 (project)


-- Configuring incomplete, errors occurred!
iMac:iterator_interface clausklein$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant