Ask Your Question
0

CMake error with OpenCV 3.2/contrib on .dnn directory

asked 2017-07-01 20:08:37 -0500

jpistorino gravatar image

updated 2017-07-02 12:46:38 -0500

I am using CMake 3.8.1 and downloaded OpenCV 3.2 and opencv_contrib_master at the same time from Github.

I specified the opencv_contrib_master directory in the OPENCV_EXTRA_MODULES_PATH line. I also deselected at least protobuf and BUILD_opencv_dnn.

However, when I try and configure in CMake I get an error saying:

CMake Error at cmake/OpenCVModule.cmake:294 (add_subdirectory):
  The binary directory

C:/OpenCV/build/modules/dnn/.dnn

  is already used to build a source directory.  It cannot be used to build
  source directory

D:/opencv_contrib-master/modules/dnn

  Specify a unique binary directory name.
Call Stack (most recent call first):
  modules/CMakeLists.txt:7 (ocv_glob_modules)

I completely deleted the opencv and the contrib directories and downloaded the packages from GitHub within 2 minutes. I deselected aruco and bioinspired. I specified the proper contrib directory for the AXTRA_MODULES_PATH. Now I get:

CMake Error at D:/opencv/cmake/OpenCVUtils.cmake:850 (file):
  file MD5 failed to read file "C:/OpenCV/build/3rdparty/tinydnn/":
  Permission denied
Call Stack (most recent call first):
   C:/opencv_contrib-master/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)

Downloading ...
CMake Error at D:/opencv/cmake/OpenCVUtils.cmake:888 (file):
  file DOWNLOAD cannot open file for write.
Call Stack (most recent call first):
  C:/opencv_contrib-master/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)


CMake Error at D:/opencv/cmake/OpenCVUtils.cmake:892 (message):
  Failed to download .  Status=
Call Stack (most recent call first):
   C:/opencv_contrib-master/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)

Any help appreciated.

edit retag flag offensive close merge delete

Comments

1

please try to reload the latest master branch of both opencv and opencv_contrib again. the dnn module was moved out of opencv_contrib, into main.

also, if you have an existing build folder, try to clean that (previous artefacts might get in your way)

berak gravatar imageberak ( 2017-07-02 00:06:53 -0500 )edit

@berak I miss this and build_itt is new too?

LBerger gravatar imageLBerger ( 2017-07-02 03:24:49 -0500 )edit

yes, itt is new too. (allows tracing/profiling of function calls, look at 3rdparty/ittnotify)

berak gravatar imageberak ( 2017-07-02 03:28:14 -0500 )edit

Tried again and updated to show latest results.

jpistorino gravatar imagejpistorino ( 2017-07-02 12:50:09 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2017-08-19 05:17:08 -0500

hgyoo gravatar image

berak's solution (dated Jul 1 '17) worked for me. Thanks.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-07-01 20:08:37 -0500

Seen: 3,613 times

Last updated: Aug 19 '17