-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Target "opencv_test_sfm" links to target "CUDA::cublas" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? #3414
Comments
OpenCV does not currently support targets resulting from FindCUDAToolkit. It looks like Ceras Solver exports these targets regardless of which version of CMake is being used. The only thing I can suggest is trying to build against opencv/opencv#23021 and #3400 to see if it solves your issue. Just out of interest why are you building for Compute 8.7 on WSL are you going to run on a Jetson? |
Hi @cudawarped thanks for sharing those PRs. I will try to build against those and see if it works for me. I will be targeting the NVIDIA Jetson AGX Xavier, but I also have a need for local inference for my proof of concept. I started out using OpenCV on Windows, but the image processing is taking too long on the CPU, so I went down the road of building with support for CUDA, and decided to build it on WSL as I thought it would be easier 🤣 |
I just thought u'll have to build with cmake 3.18+ for OpenCV to use those targets.
Let me know if it works and don't forget to build for your A2000 aswell, I think its Compute 8.6 ( |
That's right. Looks like the Jetson is SM_72 as well, so I was way off base there. I am still getting the same errors when using your PRs code.
New command line is
|
If I use OpenCV with CMake 3.24 then I don't get any CMake errors regarding CUDA targets however
|
I have cmake version 3.16.3 installed on the system. I downloaded cmake-3.24.3 and that worked. Thank you! I should say I did update the CMakeList.txt for sfm. I'm not sure if it was needed but it didn't give me the error you posted. At line 109
|
That's great although I'm not sure that modification is necessary as Ceres should be exporting those targets. I didn't get missing CUDA target errors without it did you? |
@isgallagher would it be possible to check if you can build OpenCV without modifying CMakeList.txt for sfm to see if the PR's fix the issue for you. Either way this looks like an issue with Ceras not OpenCV so should probably be closed. The developers are exporting targets for CMake >= 3.18 when it is built with CMake < 3.18. I am sure there is a reason for this although I am not sure what it is. That is if you are compiling on a machine with CMake 3.16 I don't think you would expect to build a library which can only be imported successfully with CMake >=3.18. |
Sorry, I already blew away the build environment as it turns out I don't need OpenCV. |
System information (version)
Detailed description
I have Ubuntu 20.04.5 LTS installed on WSL2 on my Windows 10 machine. I followed the OpenCV installation requests, built Ceres Solver, and am attempting to build OpenCV with CUDA support. cmake completes, but it spits out a lot of errors. The first error is below.
Full output:
Steps to reproduce
The text was updated successfully, but these errors were encountered: