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

cannot open source file "dynlink_nvcuvid.h" opencv_cudacodec #9544

Closed
Amin-Tgz opened this issue Sep 2, 2017 · 10 comments
Closed

cannot open source file "dynlink_nvcuvid.h" opencv_cudacodec #9544

Amin-Tgz opened this issue Sep 2, 2017 · 10 comments
Labels

Comments

@Amin-Tgz
Copy link

Amin-Tgz commented Sep 2, 2017

System information (version)
  • OpenCV => : 3.3:
  • Operating System / Platform => : Windows 10 , 64 Bit:
  • Compiler => :Visual Studio 2015:
Detailed description

i meet two bugs:

1.first enable preformance test cause error same as #6716

2.cannot open source file "dynlink_nvcuvid.h"

Severity Code Description Project File Line Suppression State
Error C1083
Cannot open include file: 'dynlink_nvcuvid.h': No such file or directory
opencv_cudacodec	opencv-master\modules\cudacodec\src\precomp.hpp	59	

cmake configure output

CUDA detected: 8.0
CUDA NVCC target flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-D_FORCE_INLINES

General configuration for OpenCV 3.3.0-dev

Extra modules:
Location (extra): opencv_contrib-master/modules

 Platform:
   Timestamp:                   2017-09-02T15:37:49Z
   Host:                        Windows 10.0.15063 AMD64
   CMake:                       3.9.1
   CMake generator:             Visual Studio 14 2015 Win64
   CMake build tool:            C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
   MSVC:                        1900
  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_2
      SSE4_2 (3 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
    Use Lapack:                  NO
    Use Eigen:                   NO
    Use Cuda:                    YES (ver 8.0)
    Use OpenCL:                  YES
    Use OpenVX:                  NO
    Use custom HAL:              NO
  NVIDIA CUDA
    Use CUFFT:                   YES
    Use CUBLAS:                  YES
    USE NVCUVID:                 YES
    NVIDIA GPU arch:             50 52
    NVIDIA PTX archs:
    Use fast math:               NO
  OpenCL:                        <Dynamic loading of OpenCL library>
    Include path:               opencv-master/3rdparty/include/opencl/1.2
    Use AMDFFT:                  NO
    Use AMDBLAS:                 NO


  Tests and samples:
    Tests:                       NO
    Performance tests:           NO
    C/C++ Examples:              NO

Configuring done
Generating done

@xsorifc28
Copy link
Contributor

Also getting this error, same setup.

@jasjuang
Copy link
Contributor

I also ran into the same problem

@lucaspbordignon
Copy link

Thanks @whizzzkid , the solution proposed by #9599 worked!

@whizzzkid
Copy link
Contributor

whizzzkid commented Sep 14, 2017

@lucaspbordignon this is because cuda8 provides nvcuvid.h and cuda9 provides dynlink_nvcuvid.h so opencv builds for cuda8 are not compatible with cuda9

I am still working on the solution for this. Another workaround is to use -D WITH_NVCUVID=OFF flag when building.

dkurt pushed a commit to dkurt/opencv that referenced this issue Sep 23, 2017
Incorrect Naming (opencv#9599)

* Resolved opencv#9544

* This is a better fix

* This should be good.
@ghost
Copy link

ghost commented Sep 20, 2018

Despite the merge, the issue persists with CUDA 10.

fatal error: dynlink_nvcuvid.h: No such file or directory

@achalshah20
Copy link

achalshah20 commented Sep 20, 2018

I have the same issue with CUDA 10.

Edit: I checked usr/local/cuda-10.0/include and there are no such files as dynlink_nvcuvid.h or nvcuvid.h!

@ghost
Copy link

ghost commented Sep 21, 2018

Same problem with CUDA 10

precomp.hpp:60:18: fatal error: dynlink_nvcuvid.h: No such file or directory

@petrpulc
Copy link

petrpulc commented Sep 21, 2018

NVCUVID is deprecated: https://docs.nvidia.com/cuda/video-decoder/index.html

A possible (and verified) hack is to download new NVDecode SDK: https://developer.nvidia.com/designworks/video_codec_sdk/downloads/v8.2-ga2

Which provides in Video_Codec_SDK_8.2.16/Samples/NvCodec/NvDecoder two header files (cuviddec.h and nvcuvid.h) that just need to be copied to your include folder (/usr/local/cuda/include/)

Changes to the header inclusion based on CUDA version need to be reverted accordingly, of course.

I would suggest moving these two header files to opencv directly as they only specify the interface to the decoder.

@ghost
Copy link

ghost commented Sep 21, 2018

@petrpulc Solved thanks

@castleguarders
Copy link

This workaround uses CUDA 8 definitions on CUDA 10 for a deprecated API. What is the "longer" term permanent fix? In other words, It's unclear to me if the older nvcuvid.h from Cuda 8 and the one in Cuda 10 / NVDecode SDK are compatible? I don't have Cuda 8 headers to compare.

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

9 participants