New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TBB not added to link line with Cmake and find_package( OpenCV) #21304
Comments
More details are required about OpenCV build:
The same items about your Application build including:
Run and dump output of TBB is considered as external library. It should not be redistributed with OpenCV. We don't observe problem with system's TBB installations. In ideal, it would be nice to have complete Dockerfile with problem reproducer. |
Cmake Params: Cmake Stdout I don't have at the moment as building opencv takes a very long time on my machine, but it builds successfully without any specific warnings or errors. TBB was installed as part of my OS package manager from source. I run Gentoo and used
I understand OpenCV doesn't distribute TBB but my project doesn't distribute OpenCV thus I am relying on OpenCV to list it's build libraries via its OpenCVConfig.cmake file. I have no other way to know what the users OpenCV was built with. Since OpenCV lists libraries such as cuda or cudnn via OpenCV Libraries when queried I'd expect other dependent libraries to have similar behavior. I thought perhaps after invoking Find_package, the HAVE_TBB variables from Cmake would be present but it was not the case. Let me know if you need any more details. Thanks :) |
the output of the cmake configure step is of interest. the thing that goes like |
I expect
4th library is TBB.
Perhaps there is some mess with TBB from compiler package. Please add this dump:
Expectation is not correct. Approach with |
Gathering things, I'll report back in a few |
Here's configure...
|
grep -i TBB CMakeVars.txt
|
I see here 3 versions of TBB:
This configuration cause some mess. CMake scripts fails to find TBB properly:
This is a configuration problem which unlikely can be resolved in OpenCV. You can trace cmake scripts through adding We don't help with remote investigation of problems which we are not able to reproduce on our side (because it is very time consuming and usually configuration problem without any following fix into OpenCV), but we can take a look on the clear reason of the problem and suggest some fix/workaround. |
This is a development machine with a lot going on so I would agree with your read on the situation. For now I'll wait and see if I run into another box that has this issue. |
TBB not added to link line with Cmake and find_package( OpenCV).
I know it's possible to detect if OpenCV was compiled with TBB by using ldd or other OS-specific tool. What I am trying to do is stick within CMake and the official OpenCV Cmake files. I thought maybe there would be a component specifically for TBB so I tried adding that and still no luck.
Found OpenCV: /usr/local (found version "4.5.4") found components: core imgproc highgui tracking cudafeatures2d cudaoptflow cudaimgproc freetype missing components: tbb cudaobjdetect
The following link errors appear, when I would have expected "tbb" to be added to the link line as part of OpenCV_Libraries when Cmake found OpenCV.
System information (version)
Detailed description
When using Cmake to add OpenCV to a C++ project it omits whether OpenCV was built with TBB.
Steps to reproduce
Use CMake to detect OpenCV.
Build then fails because OpenCV requires TBB on the link line but it's CMake files as installed did not request it.
Issue submission checklist
I report the issue, it's not a question
I checked the problem with documentation, FAQ, open issues,
I updated to latest OpenCV version and the issue is still there
There is reproducer code and related data files: videos, images, onnx, etc
The text was updated successfully, but these errors were encountered: