- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am creating a C++ project (let's call it project'X') on MacOS Big Sur and using Clion as IDE and CMake for configuring packages. The project relies on OpenVDB, OpenCASCADE and Boost. I am facing an error related to one of OpenVDB's dependency - TBB when I try to build the project. The build fails and throws the error at multiple places in the code (wherever OpenVDB encounters this TBB dependency): In file included from /usr/local/include/tbb/parallel_reduce.herror:: 17: reference to 'split' is ambiguous
- Background Information:
I have OpenVDB installed using brew formula, and its version is 8.1.0. CMake cannot locate OpenVDB using find_package(OpenVDB) for brew install (open problem on github: https://github.com/AcademySoftwareFoundation/openvdb/issues/412) so I added all OpenVDB libraries manually in the global CMakeLists.txt. There is only 1 CMakeLists.txt in the project.
target_include_directories(${executable}
PUBLIC
./
${OpenCASCADE_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
/usr/local/include/openvdb
/usr/local/include/tbb
)
target_link_libraries(${executable}
PUBLIC
${OpenCASCADE_LIBRARIES}
Boost::system
Boost::filesystem
# OpenVDB libraries begin:-
/usr/local/lib/libopenvdb.8.1.0.dylib
/usr/local/lib/libopenvdb.8.1.dylib
/usr/local/lib/libopenvdb.a
/usr/local/lib/libopenvdb.dylib
)
The classes and included headers on the project links up fine - CMake can locate all packages, classes and headers are able to find and recognize all dependent internal and external classes. But once I start to build the project, I get this error:
In file included from /usr/local/include/openvdb/openvdb.h:12:
In file included from /usr/local/include/openvdb/Grid.h:12:
In file included from /usr/local/include/openvdb/tree/Tree.h:13:
In file included from /usr/local/include/openvdb/tools/Count.h:/usr/local/include/tbb/../oneapi/tbb/parallel_reduce.h15::
379In file included from :57/usr/local/include/openvdb/tree/NodeManager.h:: 18:
In file included from /usr/local/include/tbb/parallel_reduce.herror:: 17:
reference to 'split' is ambiguous
**/usr/local/include/tbb/../oneapi/tbb/parallel_reduce.h:379:57: error: reference to 'split' is ambiguous**
lambda_reduce_body( lambda_reduce_body& other, tbb::split )
^ lambda_reduce_body( lambda_reduce_body& other, tbb::split )
^
/usr/local/include/openvdb/math/Coord.h:16:23: note: candidate found by name lookup is 'tbb::split'
/usr/local/include/openvdb/math/Coord.h:16:23: note: candidate found by name lookup is 'tbb::split'
namespace tbb { class split; } // forward declaration
^
namespace tbb { class split; } // forward declaration
/usr/local/include/tbb/../oneapi/tbb/parallel_for.h: ^465
:15: note/usr/local/include/tbb/../oneapi/tbb/parallel_for.h: :465candidate found by name lookup is 'tbb::v1::split':15
: note: candidate found by name lookup is 'tbb::v1::split'
using detail::split;using detail::split;
I get this same error on multiple places wherever there is an OpenVDB dependency on tbb::split. I have been unable to find a solution, here are the things I have tried:
- I located all TBB libraries and manually added them to target_link_libraries() in CMakelists.txt. They are:
/usr/local/lib/libtbb.12.dylib
/usr/local/lib/libtbb.dylib
/usr/local/lib/libtbb.12.3.dylib
-
Tried to add them using find_package(TBB) or find_package(tbb::TBB) and then using ${TBB_INCLUDE_DIRS} and ${TBB_LIBRARIES} for target_include_directories() and target_link_libraries() respectively. IF ${TBB_FOUND} is being returned true but when I try to print out on the console all the TBB's included directories and libraries using message() command, I get nothing.
-
Tried removing OpenCASCADE from the project, in case that's conflicting with its TBB dependency, but even that didn't have any effect.
Any pointers, suggestions will be very helpful. If any more information is required please let me know.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
Could you please let us know the version of oneAPI that you have been using? If it is not the latest Intel oneAPI 2021.3, Could you please try the latest version.
If you still face the issue, Could you please provide us the version of macOS you are using, along with a sample reproducer code(with the steps to reproduce the error)?
Also, Could you please let us know the details of the products(other than oneAPI) that have been installed on your system which contains TBB?
Best Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some new background -
So now the same error is coming up when I am trying to build and install openvdb from source using custom shell scripts on my Mac. I tried openvdb v-5.20 and also with the latest available version as well. I am installing it at $HOME/.cmake/folderA. All openvdb dependencies are also installed in this folderA location. These locations are passed onto the CMAKE build system during the build of openvdb using -DCMAKE options. I have attached the shell scripts for both the tbb and openvdb, that I used for you to be able replicate it.
Do you mean TBB version? For building my openvdb 5.2.0 I used tbb 2018_U6 from https://github.com/01org/tbb/archive/2018_U6.tar.g.
I have attached the compressed folder "TBB Info Versions and Locations". It contains 2 files - one has all version information from the "version.h" header in tbb includes folder, from a few tbb locations on my computer. The second file contains list of all "tbb*" directories located on my computer - there are many.
Please let me know if you need any other information. Any clue will be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for providing the shell scripts for reproducing the issue.
Could you please let us know the version of macOS that you are using?
Awaiting your reply.
Best Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its MacOS Big Sur, version 11.4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am also trying something in parallel. https://academysoftwarefoundation.github.io/openvdb/dependencies.html says that I should have ICC compiler 17 or latest, how do I verify this on my MacOS? Couldn't find anything on the internet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>"Its MacOS Big Sur, version 11.4"
We recommend you to use any of the Intel oneAPI supported MacOS* versions.
To use the latest oneAPI 2021.3, use any of the following supported MacOS versions:
macOS* 10.15
macOS 11.0, 11.2,11.3 Big Sur
For more information, Go through the below link:
>>" I should have ICC compiler 17 or latest, how do I verify this on my MacOS? Couldn't find anything on the internet."
We can verify ICC compiler version on both MacOS & linux by using the below command:
icc -v
however, before the release of intel oneAPI 2021.1, we can get to know the version(Ex: ICC 17.x/ ICC 18.x / ICC 19.x )of compiler by using "icc -v" command as below:
But, After the release of Intel oneAPI 2021.1, we can only able to see the version of oneAPI that the compiler belongs to(Ex: ICC version 2021.x).
**We see that the content of (https://academysoftwarefoundation.github.io/openvdb/dependencies.html) may not be an updated one.
As it says " ICC compiler must be of version 17 or latest", you can try using ICC from the latest intel oneAPI compilers (2021.3) along with a supported MacOS version as mentioned above & TBB of intel oneAPI 2021.3(instead of 2018 update6). If you still face the issue, please get back to us.
Thank You,
Best Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see, so what you are saying is that to resolve this issue, there is no option but to downgrade my Mac OS, correct? Also, I have understood that my OS version is not supported by any of old or latest oneAPI compilers, and so that's why I might be getting TBB related issues. Reverting OS to a lower version is risky as it requires complete wiping down of my Mac disk and reinstalling an older version - might create more problems than I have set out to solve! Thanks for your detailed response though!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>" I have understood that my OS version is not supported by any of old or latest oneAPI compilers, and so that's why I might be getting TBB related issues. "
Yes. That might be the reason for this issue.
Could you please let us know if there is anything else that we can help you with?
Best Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about if I run a Ubuntu 18.04 Docker container on my MacOS 11.4 and install everything there? I can then install my application also on the docker and run it from there. What version of oneAPI and openVDB would you recommend for that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>"How about if I run a Ubuntu 18.04 Docker container on my MacOS 11.4 and install everything there?"
Yes, you can try to do that.
>>"What version of oneAPI and openVDB would you recommend for that?"
We recommend you to use latest Intel OneAPI 2021.3 & you can continue with the same version of openVDB. Also try using TBB of intel oneAPI 2021.3 instead of 2018 update 6.
For installing oneAPI using containers, follow the below link:
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Could you please let us know if the issue still persists?
Thanks,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.
Thanks & Regards,
Santosh
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page