Ask Your Question
1

opencv_dep_cudart.lib problem with CMake in OpenCV 2.4.13

asked 2016-05-27 17:06:33 -0600

tialis gravatar image

Hi,

There seems to be a bizarre dependency included when I use CMake to include OpenCV in a Windows VS 11 project. CMake includes a dependency: opencv_dep_cudart.lib

This library doesn't seem to be included with or built by OpenCV. I know that it's related to CUDA, which is installed. Another strange thing about this dependency is that, unlike the others, CMake doesn't provide a path for it. It's just hanging there after all of the other dependencies. If I remove it, the code compiles fine.

Here is what the relevant portion of the dependency list looks like in VS 11:

...
E:\lib\opencv\build\lib\Release\opencv_videostab2413.lib
E:\lib\opencv\build\lib\Release\opencv_ts2413.lib
E:\lib\opencv\build\lib\Release\opencv_superres2413.lib
E:\lib\opencv\build\lib\Release\opencv_stitching2413.lib
E:\lib\opencv\build\lib\Release\opencv_contrib2413.lib
E:\lib\opencv\build\lib\Release\opencv_nonfree2413.lib
E:\lib\opencv\build\lib\Release\opencv_ocl2413.lib
E:\lib\opencv\build\lib\Release\opencv_gpu2413.lib
E:\lib\opencv\build\lib\Release\opencv_photo2413.lib
E:\lib\opencv\build\lib\Release\opencv_objdetect2413.lib
E:\lib\opencv\build\lib\Release\opencv_legacy2413.lib
E:\lib\opencv\build\lib\Release\opencv_video2413.lib
E:\lib\opencv\build\lib\Release\opencv_ml2413.lib
E:\lib\opencv\build\lib\Release\opencv_calib3d2413.lib
E:\lib\opencv\build\lib\Release\opencv_features2d2413.lib
E:\lib\opencv\build\lib\Release\opencv_highgui2413.lib
E:\lib\opencv\build\lib\Release\opencv_imgproc2413.lib
E:\lib\opencv\build\lib\Release\opencv_flann2413.lib
E:\lib\opencv\build\lib\Release\opencv_core2413.lib
opencv_dep_cudart.lib
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64\nppc.lib
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64\nppi.lib
...

I know that it's included when I link OpenCV in CMake. Also, the only mention I can find of this file anywhere is in a few of the OpenCV CMake files.

In addition, CMake gives the following warning when generating the VS 11 solution for OpenCV:

CMake Warning at cmake/OpenCVPackaging.cmake:23 (message):
  CPACK_PACKAGE_VERSION does not match version provided by version.hpp
  header!
Call Stack (most recent call first):
  CMakeLists.txt:1105 (include)

which may be related.

We can do development by just removing it from the dependency list. However, we distribute our code and are going to run into problems walking other people through the build process if this happens.

Is there something silly I'm missing? As far as I can tell, nobody has heard of this file. A Google search didn't even return anything. My initial thought is that there is a bug in the CMake files, however I would expect everyone to be running into problems if that were the case.

Thanks!

edit retag flag offensive close merge delete

Comments

Hi. I have a similar problem when I try build opencv for Mac OSX. Do let me know if you found a solution?

Rudra gravatar imageRudra ( 2016-07-20 11:38:34 -0600 )edit

I also get a similar issue under Mac OSX, can get rid of the opencv_dep_cudart error by setting this: CUDA_USE_STATIC_CUDA_RUNTIME=false.

ffurrer gravatar imageffurrer ( 2016-08-09 06:00:23 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-20 12:07:14 -0600

Rudra gravatar image

Hello,

I did a quick find for the second part of your question and it seems this line of code was the source of our warning.

 if(GIT_EXECUTABLE)
  execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty --match "2.[0-9].[0-9]*"
    WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
    OUTPUT_VARIABLE OPENCV_VCSVERSION
    RESULT_VARIABLE GIT_RESULT
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE
  )
  if(NOT GIT_RESULT EQUAL 0)
    set(OPENCV_VCSVERSION "unknown")
  endif()
else()
  # We don't have git:
  set(OPENCV_VCSVERSION "unknown")
endif()

This snipper of code belongs to the CMakeLists.txt file. It essentially sets our OPENCV_VCSVERSION to "unknown". I don't think it would create any problems for us in the long run and can be safely overlooked.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-27 17:06:33 -0600

Seen: 3,839 times

Last updated: Jul 20 '16