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

opencv-4.1.0: cudaoptflow links to cuda 10.1 failed #14999

Closed
haquocviet opened this issue Jul 9, 2019 · 2 comments
Closed

opencv-4.1.0: cudaoptflow links to cuda 10.1 failed #14999

haquocviet opened this issue Jul 9, 2019 · 2 comments
Labels

Comments

@haquocviet
Copy link

System information (version)
  • OpenCV => 4.1.9
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2019
  • CUDA Toolkit => 10.1
Detailed description

This is the output generated from cmake-gui

First I generate opencv solution for building by cmake-gui

_General configuration for OpenCV 4.1.0 =====================================
Version control:               327494e9-dirty

Platform:
 Timestamp:                   2019-07-08T15:05:05Z
 Host:                        Windows 10.0.18362 AMD64
 CMake:                       3.14.1
 CMake generator:             Visual Studio 16 2019
 CMake build tool:            C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
 MSVC:                        1921

CPU/HW features:
 Baseline:                    SSE SSE2 SSE3
   requested:                 SSE3
 Dispatched code generation:  AVX2
   AVX2 (33 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2

C/C++:
 Built as dynamic libs?:      YES
 C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe  (ver 19.21.27702.2)
 Extra dependencies:          cudart_static.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64
 3rdparty dependencies:

OpenCV modules:
 To be built:                 bgsegm bioinspired calib3d core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect features2d flann gapi highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow photo plot quality reg stitching superres surface_matching tracking ts video videoio videostab ximgproc
 Disabled:                    aruco ccalib cudalegacy dpm face fuzzy hfs java_bindings_generator phase_unwrapping python_bindings_generator rgbd saliency shape stereo structured_light text world xfeatures2d xobjdetect xphoto
 Disabled by dependency:      -
 Unavailable:                 cnn_3dobj cvv freetype hdf java js matlab ovis python2 python3 sfm vi_z

Next, I opened and built the library, after approx one hour I got almost dlls built successfully except this one: "cudaoptflow" failed linking with errors:

error LNK2019: unresolved external symbol cuCtxPushCurrent_v2 referenced in function "public: virtual void __cdecl `anonymous namespace'::NvidiaOpticalFlowImpl::calc(
//other similar errors with functions 
cuCtxPopCurrent_v2 
cuCtxGetCurrent
cuCtxSynchronize 

I doubt that maybe those functions above have been deprecated or I configured something wrong.
I want to know if there is someone else gets similar error and if there is a solution for this issue.

Steps to reproduce

Just install CUDA Toolkit, run cmake-gui then set path for extra-modules (contrib) and select cudaoptflow module, then build the generated solution.

@alalek
Copy link
Member

alalek commented Jul 9, 2019

Do you have this patch: #14888 ?

@haquocviet
Copy link
Author

Thanks for your tip. I updated to master (4.1.1-pre) and built successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants