opencv_contrib: fatal error: boostdesc_bgm.i: No such file or directory
Using this cmake config:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON
-D OPENCV_EXTRA_MODULES_PATH=~/opencv/opencv_contrib/modules -D BUILD_opencv_dnns_easily_fooled=OFF
-D BUILD_opencv_dnn_modern=OFF -D BUILD_opencv_cnn_3dobj=OFF
-D PYTHON_EXECUTABLE=/usr/bin/python
-D WITH_CUDA=OFF -D BUILD_SHARED_LIBS=OFF
-D BUILD_EXAMPLES=ON ..
Just disable some dnn module which need caffe, since I am not installed caffe. But I need xfeatures module which give me those errors. It seems boostdesc.cpp not able to found, but I installed libboost-all-dev. Any idea about this would be very appreciated, because the exactly same process I have build succeed many times except this. My script build from latest source so I think it might be a recently bug!
[ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o
/root/opencv/opencv_contrib/modules/xfeatures2d/src/boostdesc.cpp:646:37: fatal error: boostdesc_bgm.i: No such file or directory
compilation terminated.
modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:94: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 45 (6 by maintainers)
Hi! The solution I used was to download by hand all the missing files, so if you encounter the same issue please use the folliwing command in a bash file:
#!/bin/bash cd ./cache/xfeatures2d/ cd boostdesc
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i > e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i > 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i > 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i > 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i > 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i cd …/vgg curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i > 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i > 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i > e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i > 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
And then run cmake again, and make. Hope this help
I pack them up. download this and unzip it ,that’s ok. patch__.zip
the unsupported protocol is https in this case. cmake calls either curl or wget internally, to download files, and whatever it used, it was misconfigured for https.
maybe updating curl (or wget) on your machine already helps, if not so, you could try to download the files manually, e.g.:
(or simply from a webbrowser) in the end, your opencv/.cache should look like this:
Hey,
I’m new to the compilation game, but I ran into this problem and finally solved it so wanted to share the steps for anyone in the same place. My OS is Ubuntu 18.04 and I’m running CUDA 10.0. I’m running the following cmake command with cudacodec turned off because apparently nvcuvid is deprecated in cuda10: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$cwd/installation/OpenCV-“$cvVersion” -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D WITH_TBB=ON -D WITH_V4L=ON -D OPENCV_PYTHON3_INSTALL_PATH=$cwd/OpenCV-$cvVersion-py3/lib/python3.5/site-packages -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_CUDA=ON -D CUDA_ARCH_BIN=6.1 -D CUDA_VERBOSE_BUILD=ON -D BUILD_opencv_cudacodec=OFF -D OPENCV_EXTRA_MODULES_PATH=…/…/opencv_contrib/modules -D BUILD_EXAMPLES=ON …
At this point I manually downloaded the boostdesc and vgg files as suggested above. You actually don’t have to do much more than lookate the download_with_curl.sh file (that’s in your build folder). First ensure the file is executable by running the following command: chmod +x download_with_curl.sh then run the file with ./download_with_curl.sh The boostdesc and vgg folders with the files will download into opencv/.cache/xfeatures2d/
Now this is where I ran into trouble (took me a while to solve). My extra modules folder which is linked to the xfeatures2d modules is in a seperate file path than the opencv build path. With the above recommendations I made the mistake of copying the boostdesc and vgg folders into opencv/build/modules/xfeatures2d/src that is wrong. You want to copy the two folders to opencv_contrib/modules/xfeatures2d/src You can do that through the following command (presuming your opencv_contrib directory is in the same location as your opencv directory if you are currently in the build directory cp …/.cache/xfeatures2d/vgg …/…/opencv_contrib/modules/xfeatures2d/src cp …/.cache/xfeatures2d/boostdesc …/…/opencv_contrib/modules/xfeatures2d/src
That’s all folks. Like I said I’m new to this game so sorry if any mistakes. Anyways good luck to you all 😃
Let’s review this issue, the problem has last more than three years and it’s time to end the issue and conclude a satisfactory solution to save programmers’ time.
Issue Restatement
This issue arises when your CMake fails trying to download the boostdest/vgg packages required by xfeatures2d module. Users would meet the issue either in the procedure of downloading or compiling xfeatures2d.
Why?
Possible reasons:
Solution
@leaf918 's reply resolves my issue quickly. https://github.com/opencv/opencv_contrib/issues/1301#issuecomment-618262386
The zip file contains two folders named boostdest and vgg respectively. You would probably find that in your <cloned opencv repo>/.cache/xfeatures2d path there are two folders boostdest/vgg which might be either empty or (probably) filled with a series of file with random names. Just unzip the
patch__.zip
and overwrite the files.Suggestion
It seems this is a common issue considering the number of replys under this issue. The trouble it made can be regarded as a design leak of opencv build procedure and we’d better schedule to improve the make experience. Changing download link or approach probably would relieve users.
@Firststep2014 , yes there was a typo. (thanks)
and you have to run cmake again, so it copies the files from cmake/.downloads to modules/xfeatures2d/src
With network proxy you can try this too:
@Firststep2014 @BenbenIO I solve this problem. I made a lot of possible attempts, and many of the others had some documents. Only when the file in the red box is added does it really work.
I had similar issue, but the reason was manually installed “cmake” which is using internal libcurl (w/o https support) by default. You can find explanation here: https://stackoverflow.com/questions/51573524/cmake-is-unable-to-download-by-protocol-https-while-own-cmake-option-procedure
that slove my problem, thx!
My issue was because of proxy.
cmake
callscurl
which may have failed if you are behind a proxy. (export http_proxy didn’t work for me)Solution : Update all the curl commands in
opencv/build/download_with_curl.sh
file to specify the proxy via-x
option.curl -x http://proxyip:port --output <path unchanged> <path unchanged>
Then runcmake
andmake
Edit: export http_proxy didn’t work because
cmake
was using its internalcurl
. Fixed that by adding--system-curl
flag to thecmake
command