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

dnn and xfeatures2d cmake ocv_download needs PACKAGE instead of FILENAME #1100

Closed
mevanecek opened this issue Mar 30, 2017 · 16 comments
Closed

Comments

@mevanecek
Copy link

System information (version)
  • OpenCV => 3.1.0 and 3.2.0
  • Operating System / Platform => Windows 64 Bit and Mac OS 10.12.3
  • Compiler => Visual Studio 2015 and XCode, CMake 3.8.0
Detailed description

When configuring opencv with opencv_contrib, the configure fails on the dnn and xfeatures2d modules. The CMake files use FILENAME in the call to ocv_download, but should use PACKAGE as specified in the opencv. This generates the following errors. I've replicated this on Mac OS X and on Windows 7 using CMake-gui.

Downloading ...
CMake Error at /Users/Documents/opencv/source/opencv-3.2.0/cmake/OpenCVUtils.cmake:1045 (file):
file DOWNLOAD cannot open file for write.
Call Stack (most recent call first):
/Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download)
/Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/CMakeLists.txt:5 (include)

CMake Error at /Users/Documents/opencv/source/opencv-3.2.0/cmake/OpenCVUtils.cmake:1049 (message):
Failed to download . Status=
Call Stack (most recent call first):
/Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download)
/Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/CMakeLists.txt:5 (include)


Files that use FILENAME instead of PACKAGE:
opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake
opencv_contrib-master/modules/xfeatures2d/cmake/download_boostdesc.cmake
opencv_contrib-master/modules/xfeatures2d/cmake/download_vgg.cmake


Steps to reproduce

Using cmake-gui

  1. Configure opencv
  2. Add the opencv_contrib/modules as the OPENCV_EXTRA_MODULES_PATH value.
  3. Start configure again.
  4. Configure fails.
@mevanecek mevanecek changed the title dnn and xfeatures2d cmake oc_download needs PACKAGE instead of FILENAME dnn and xfeatures2d cmake ocv_download needs PACKAGE instead of FILENAME Mar 30, 2017
@iamacm
Copy link

iamacm commented Mar 30, 2017

Great thanks! I am stuck with this issue for hours today. This solves my problem.

@alalek
Copy link
Member

alalek commented Mar 30, 2017

opencv-3.2.0/cmake/OpenCVUtils.cmake:1045

This is non fresh OpenCV code.

opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake

Looks like, this is the latest opencv_contib code.

You should keep codebases synchronized.

@mevanecek
Copy link
Author

alalek,
My codebase is synchronized; I grabbed opencv_contrib directly from GitHub, which is the only way to get the opencv_contrib as far as I can tell, since there aren't any binaries available. I'm only using the git repository because there is no other options. The OpenCV 3.2.0 is the latest package available from the OpenCV downloads. I don't even want to compile the darn things, but that's the only way to get the contrib stuff included.

@alalek
Copy link
Member

alalek commented Mar 30, 2017

I grabbed opencv_contrib directly from GitHub

The OpenCV 3.2.0 is the latest package available from the OpenCV downloads.

This configuration is not synchronized.

  1. You should checkout "opencv_contrib" to 3.2.0 (git checkout 3.2.0 command). Also you can get it as ZIP archive by "tag": https://github.com/opencv/opencv_contrib/archive/3.2.0.zip .
  2. Or you should use "opencv" repository from GitHub "master" branch too.

@mevanecek
Copy link
Author

Where do you even see the tags at?? Nevermind, I'll find a github book. The ZIP link is what I needed, I guess; I wish it were more prominent, like being able to download ZIPs from the OpenCV site. Thanks for that; I'll close the defect and try to learn more about Git. Too many VCS's to learn.

@zxw1992
Copy link

zxw1992 commented Apr 1, 2017

@alalek Thanks. How can I synchronize the configuration?

@grob72
Copy link

grob72 commented Apr 15, 2017

Thanks. very useful.
I also needed to modify in the same way
opencv_contrib-master/modules/dnn_modern/CMakeLists.txt

System information
OpenCV = 3.2.0
Operating System => Windows 10 64 Bit
Compiler => Visual Studio 2013, CMake 3.8.0

@ShijianXu
Copy link

in opencv_contrib/modules/dnn_modern/CMakeLists.txt, there is an ocv_download, too. ALSO NEED TO CHANGE FILENAME TO PACKAGE

@Mogikan
Copy link

Mogikan commented Apr 21, 2017

Master is broken and this is BAD! Try to download master and you'll reproduce the issue,

@alalek
Copy link
Member

alalek commented Apr 21, 2017

@Mogikan
Copy link

Mogikan commented Apr 21, 2017

@alalek OK, seems like I now understand what is the problem. I use different sources codebase for open cv and contrib library. Thanks.

@anhnamxtanh
Copy link

I used opencv 3.2.0, ubuntu 14.04, lastest opencv_contrib.

And I used command: cmake -DOPENCV_EXTRA_MODULES_PATH=~/opencv-3.2.0/opencv_contrib/modules/ -DBUILD_opencv_legacy=OFF ~/opencv-3.2.0/

But still error:
-- Downloading ...
CMake Error at cmake/OpenCVUtils.cmake:1043 (file):
file DOWNLOAD cannot open file for write.
Call Stack (most recent call first):
opencv_contrib/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download)
opencv_contrib/modules/dnn/CMakeLists.txt:5 (include)

Can you tell me why? or how to check. Thanks

@alalek
Copy link
Member

alalek commented Jun 18, 2017

opencv 3.2.0
lastest opencv_contrib

Incompatible configuration.

You should change opencv to the latest version or opencv_contrib to 3.2.0. Keep these codebases synchronized with the same version.

@anhnamxtanh
Copy link

@alalek
I download opencv 3.2 from http://opencv.org/releases.html
and clone opencv_contrib: git clone https://github.com/opencv/opencv_contrib

Can you tell me where "Incompatible configuration."?

@Mogikan
Copy link

Mogikan commented Jun 18, 2017

You should clone not master but tag 3.2 from github.

@chichivica
Copy link

chichivica commented Oct 3, 2017

git checkout tag/3.2.0 to checkout by tag

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

No branches or pull requests

9 participants