Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
61 Views

Reference to 'split' is ambiguous

I'm attempting to get a library build on my machine that relies on TBB. It was building previously, then I updated my machine, pulling in the latest version in (2021.1-beta08). I believe I had beta07 before as I originally installed via apt last week.

When building, I'm getting the following error:

/usr/include/tbb/tbb_stddef.h:413:14: error: reference to 'split' is ambiguous
    operator split() const { return split(); }
             ^
/usr/include/tbb/tbb_stddef.h:395:7: note: candidate found by name lookup is 'tbb::split'
class split {
      ^
/opt/intel/oneapi/tbb/2021.1-beta08/env/../include/tbb/concurrent_set.h:199:15: note: candidate found by name lookup is 'tbb::v1::split'
using detail::split;

I made a copy of the offending header to preserve it, and modified the ambiguous calls to "split()" to "tbb::split()" in a bid to resolve the ambiguity.

This, then, builds most of the way, and produces the following error:

/usr/include/tbb/tbb_stddef.h:395:12: error: redefinition of 'split'
class tbb::split {
           ^
/opt/intel/oneapi/tbb/2021.1-beta08/env/../include/tbb/detail/_range_common.h:32:7: note: previous definition is here
class split {};
      ^

Is this a known issue or a way I can correct it locally? Alternatively, is there a way I can downgrade to a prior version of the OneAPI/TBB so I can at least build?

Main system is Ubuntu 18.04, although the same error occurs in a 20.04 Docker container. Happy to provide more details if required.

0 Kudos
1 Reply
Highlighted
Beginner
49 Views

Looks like this an issue with having the OneAPI install and libtbb-dev; apparently tbb_stddef.h no longer exists once I remove libtbb-dev, which CMake in the build is looking for. I assume tbb_stddef.h has been removed; is there a direct replacement or similar?

0 Kudos