Closed dennisklein closed 2 weeks ago
Thanks for sharing your findings :+1:
Since TBB is a rather heavy dependencies this should at least be optional, we'll have to look into how the decision to use it was made, I assume there will be some flags that will disable using the system TBB even if it is installed so that we can introduce an option that either disables TBB or adds the linker flag.
gcc is indeed just checking if the tbb/tbb.h
header is available.
Defining _GLIBCXX_USE_TBB_PAR_BACKEND
by default and having option to alternatively require TBB and add the linker flag should do the trick.
https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/include/bits/c%2B%2Bconfig#L874-L882
On Fedora 40 with GCC 14.1 and libstdc++ I get a couple of
/usr/bin/ld: algorithm/test/CMakeFiles/qa_FilterTool.dir/qa_FilterTool.cpp.o: in function `void tbb::detail::(...)
. The following change made it compile for me with my system compiler:However, I am not too familiar with your build system, so someone else should review this and revise a proper fix. See also:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using.html#manual.intro.using.flags