You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Since <version> is a C++ Standard Library header, having another <version> in the users include path results in undefined behavior. It can also break the C++ Standard Library itself in the same manner as it breaks TBB. We can still do something on the TBB side to improve user experience in that regard. By the way, which sources of jsoncpp did you use? I have checked this repo and there is no <version> header there, only the version.h which should be included as <json/version.h> and adding jsoncpp/include into the include 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 4cc1cca
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.
The text was updated successfully, but these errors were encountered: