Skip to content
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

[opencv4[cuda]] build failure #31632

Closed
Data-Adventure opened this issue May 25, 2023 · 9 comments
Closed

[opencv4[cuda]] build failure #31632

Data-Adventure opened this issue May 25, 2023 · 9 comments
Assignees
Labels
category:question This issue is a question

Comments

@Data-Adventure
Copy link

Operating system

ubuntu22.04

Compiler

gnu

Steps to reproduce the behavior

vcpkg install "opencv4[cuda]:x64-linux" --recurse

Failure logs

image

config-x64-linux-dbg-CMakeCache.txt.log
config-x64-linux-out.log
config-x64-linux-rel-CMakeCache.txt.log

Additional context

No response

@Data-Adventure Data-Adventure added the category:port-bug The issue is with a library, which is something the port should already support label May 25, 2023
@Data-Adventure
Copy link
Author

In fact, I think the problem is this, but I don't know how to solve it through VCPKG
image

@MonicaLiu0311
Copy link
Contributor

Will verify as soon as possible.

@MonicaLiu0311
Copy link
Contributor

  • x64-linux
  • Ubuntu 22.04
  • Vcpkg version:
    root@monica003:/home/monica/vcpkg# ./vcpkg version
    vcpkg package management program version 2023-04-07-bedcba5172f5e4b91caac660ab7afe92c27a9895
    

Sorry I didn't repro your issue.

root@monica003:/home/monica/vcpkg# ./vcpkg install "opencv4[cuda]:x64-linux" --recurse --binarysource=clear
Computing installation plan...
The following packages will be built and installed:
    opencv4[contrib,core,cuda,default-features,dnn,gtk,jpeg,png,quirc,tiff,webp]:x64-linux -> 4.7.0#6

...

-- Configuring x64-linux
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Performing post-build validation
Stored binaries in 0 destinations.
Elapsed time to handle opencv4:x64-linux: 2.8 h
Total install time: 2.8 h
If you do not install the meta-port *opencv*, the package opencv4 is compatible with CMake
if you set the OpenCV_DIR *before* the find_package call

    set(OpenCV_DIR "${VCPKG_INSTALLED_DIR}/x64-linux/share/opencv4")
    find_package(OpenCV REQUIRED)

@MonicaLiu0311
Copy link
Contributor

Are you using the latest version of vcpkg?

refer to:
#7913 (comment)
opencv/opencv#16460

@MonicaLiu0311 MonicaLiu0311 added requires:repro The issue is not currently repro-able and removed category:port-bug The issue is with a library, which is something the port should already support labels May 29, 2023
@Data-Adventure
Copy link
Author

I used the latest vcpkg
vcpkg package management program version 2023-04-07-bedcba5172f5e4b91caac660ab7afe92c27a9895
in my ubuntu, i have
Cuda compilation tools, release 12.1, V12.1.105
cuda-12.1 cuda-12.0
i'm using cuda-12.1 in my .zshrc.
but my nvidia-smi shows my cuda version is 12.0 which i install it through ubuntu driver

@MonicaLiu0311
Copy link
Contributor

Multiple cuda versions can be installed, I also have 12.0 and 12.1.

Please try the following command to check if your .zshrc is valid:

root@monica003:/home/monica# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0

@Data-Adventure
Copy link
Author

emmmmm......

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0

@FrankXie05
Copy link
Contributor

@Data-Adventure
For the special processing we do with cuda, please make sure that you have checked the installation of the library during the manual installation of cuda.

//"cufft" library
CUDA_cufft_LIBRARY:FILEPATH=CUDA_cufft_LIBRARY-NOTFOUND

//"cupti" library
CUDA_cupti_LIBRARY:FILEPATH=CUDA_cupti_LIBRARY-NOTFOUND

//"curand" library
CUDA_curand_LIBRARY:FILEPATH=CUDA_curand_LIBRARY-NOTFOUND

//"cusolver" library
CUDA_cusolver_LIBRARY:FILEPATH=CUDA_cusolver_LIBRARY-NOTFOUND
...
...

@Data-Adventure
Copy link
Author

thank you all, i reinstall cuda, it's work !

@FrankXie05 FrankXie05 added category:question This issue is a question and removed requires:repro The issue is not currently repro-able labels May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

3 participants