oneTBB
oneTBB copied to clipboard
_has_include() breaks TBB compilation when other software have <version> files in include search path
Summary
Recently TBB added a conditional include of the file <version> at https://github.com/oneapi-src/oneTBB/blob/master/include/oneapi/tbb/detail/_config.h#L31 from commit https://github.com/oneapi-src/oneTBB/commit/4cc1ccac6f00bd57ceee5325ad9f2593b20bb046
This means that if any app that uses TBB itself has a file called <version> in its include path, or one of its other dependencies has this, then it will include this other file and most likely break compilation - or worse, succeed but include the wrong code.
I encountered this issue compiling an app that uses jsoncpp with tbb, and jsoncpp happens to have its own <version> file in its include path which breaks tbb compilation.
Version
Bundled version in Ubuntu 24.04.1 and also OneAPI git master branch.
Environment
N/A
Observed Behavior
Broken compilation
Expected Behavior
Successful compilation
Steps To Reproduce
You could try to compile https://github.com/arm-software/lavatube on Ubuntu 24.04.1
Recommended action: Add additional search paths to _has_include to prevent accidental includes of other <version> files.