1

Problem:

I am installing OpenCV 3.1.0 with CUDA support in ubuntu 16.04 and for that I chose defined by myself destination folder instead of /usr/local .

cmake and make go on properly, however I get an error upon make install (sudo make install does not alleviate it, anyway I do not build into directory that requires root priviledges).

I don't know what I am doing wrong and which direction to go now. I basically wanted to replicate from this tutorial and I did not omit any step. Please help.

Information:

error:

CMake Error at apps/annotation/cmake_install.cmake:42 (file):
  file INSTALL cannot find
  "~/libraries/opencv-3.1.0/release/installed/bin/opencv_annotation".
Call Stack (most recent call first):
  apps/cmake_install.cmake:39 (include)
  cmake_install.cmake:84 (include)
  Makefile:116: recipe for target 'install' failed

my cmake configuration:

cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_INSTALL_PREFIX=~/libraries/opencv-3.1.0/release/installed \
      -D WITH_CUDA=ON \
      -D ENABLE_FAST_MATH=1 \
      -D CUDA_FAST_MATH=1 \
      -D WITH_CUBLAS=1 \
      -D INSTALL_C_EXAMPLES=OFF \
      -D INSTALL_PYTHON_EXAMPLES=ON \
      -D OPENCV_EXTRA_MODULES_PATH=~/libraries/opencv_contrib/modules \
      -D BUILD_EXAMPLES=ON ~/libraries/opencv
  • opencv_contrib on branch 3.1.0, opencv on branch with cuda 8.0 support as suggested in here.
  • INSTALL_C_EXAMPLES=OFF as suggested in here.
talonmies
  • 70,661
  • 34
  • 192
  • 269
beginh
  • 1,133
  • 3
  • 26
  • 36
  • Make sure `BUILD_opencv_apps` is ON. – zindarod Sep 06 '17 at 16:43
  • Unsure whether CMake correctly processes `~` in paths. Try to avoid them (use `$HOME` instead). – Tsyvarev Sep 06 '17 at 16:45
  • Tsyvarev i have there my full directories, just cut for clarity. @Zindarod, just recompiling with the flag as you said, I will report on the result asap. – beginh Sep 06 '17 at 16:47
  • @Zindarod it-just-worked. Many thanks. Im wondering, how could I find it out before, where? is that some obsolete option? – beginh Sep 06 '17 at 17:15
  • Go to your OpenCV build folder. In terminal run `ccmake ..`, in the first page you should see `BUILD_opencv_apps` is ON/OFF. – zindarod Sep 06 '17 at 17:20
  • yes, my question was more about how could I know that it should be OFF, not mentioned in any tutorial I followed. Thanks anyway! – beginh Sep 06 '17 at 17:24
  • Not sure I understood ur last comment, but if you find the ```CMakeCache.txt``` file within the output directory, look for ```BUILD_opencv_apps``` and set it off or on as you like. Then re-run the cmake command to build opencv. BUILD_opencv_apps flag simply as it states will build opencv apps included within the sources. You'll be able to run them after the build is complete. – ahasbini Sep 13 '17 at 21:38

0 Answers0