oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

tbbmalloc linked as C causes build failure when using GCC 15

Open loqs opened this issue 7 months ago • 0 comments

Summary

Linking of tbbmalloc using GCC 15 fails when CXXFLAGS contain -Wp,-D_GLIBCXX_ASSERTIONS.

Version

oneTBB 2022.1.0.

Environment

  • x86_64
  • Arch Linux rolling release
  • g++ (GCC) 15.1.1 20250425
    Copyright (C) 2025 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    
    

Observed Behavior

oneTBB fails to build.

Expected Behavior

oneTBB builds without error.

Steps To Reproduce

$ curl -O -L https://github.com/uxlfoundation/oneTBB/archive/v2022.1.0/onetbb-2022.1.0.tar.gz
$ tar -xf onetbb-2022.1.0.tar.gz
$ export CXXFLAGS='-Wp,-D_GLIBCXX_ASSERTIONS'
$ cmake -B build -S oneTBB-2022.1.0 
$ cmake --build build 
....
[ 20%] Linking C executable ../gnu_15.1_cxx11_64_none/test_malloc_pure_c
/usr/bin/ld: ../gnu_15.1_cxx11_64_none/libtbbmalloc.so.2.15: undefined reference to `std::__glibcxx_assert_fail(char const*, int, char const*, char const*)'
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/test_malloc_pure_c.dir/build.make:102: gnu_15.1_cxx11_64_none/test_malloc_pure_c] Error 1
make[1]: *** [CMakeFiles/Makefile2:5139: test/CMakeFiles/test_malloc_pure_c.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Full log in additional information.

Additional Information

loqs avatar May 22 '25 13:05 loqs