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

fatal error: boostdesc_bgm.i: No such file or directory #1301

Closed
lucasjinreal opened this issue Jul 28, 2017 · 45 comments
Closed

fatal error: boostdesc_bgm.i: No such file or directory #1301

lucasjinreal opened this issue Jul 28, 2017 · 45 comments

Comments

@lucasjinreal
Copy link

lucasjinreal commented Jul 28, 2017

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

@alalek
Copy link
Member

alalek commented Jul 28, 2017

Check CMake stdout log - it should warn about failed files downloading. Check CmakeDownloadLog.txt from build folder for details.

Currently xfeatures2d modules doesn't support conditional compilation with missing external files.

Similar problem: #1131

@lucasjinreal
Copy link
Author

Many thanks, indeed cmake out shows that all things required by xfeature2d are all download fail:

CMake Warning at cmake/OpenCVDownload.cmake:188 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /root/opencv/build/CMakeDownloadLog.txt

Call Stack (most recent call first):
  opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22 (ocv_download)
  opencv_contrib/modules/xfeatures2d/CMakeLists.txt:8 (download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_bgm_bi.i
CMake Warning at cmake/OpenCVDownload.cmake:188 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

  For details please refer to the download log file:

  /root/opencv/build/CMakeDownloadLog.txt

Call Stack (most recent call first):
  opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22 (ocv_download)
  opencv_contrib/modules/xfeatures2d/CMakeLists.txt:8 (download_boost_descriptors)


-- xfeatures2d/boostdesc: Download: boostdesc_bgm_hd.i
CMake Warning at cmake/OpenCVDownload.cmake:188 (message):
  xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"

But, it says unsupported protocol, what this exactly mean? I am able to access internet without doubt.
Anyway, those package can be locally downloaded and place into which folder?

@berak
Copy link
Contributor

berak commented Jul 28, 2017

But, it says unsupported protocol, what this exactly mean?

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.:

    curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_lbgm.i 

(or simply from a webbrowser)
in the end, your opencv/.cache should look like this:

.cache
│
└───xfeatures2d
    ├───boostdesc
    │       0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
    │       0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
    │       202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
    │       232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
    │       324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
    │       98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
    │       e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
    │
    └───vgg
            151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
            7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
            7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
            e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i

@lucasjinreal
Copy link
Author

Very thanks berak, I'll check it.

@lucasjinreal
Copy link
Author

Hi, berak, However another problem occured:

/home/jintian/Downloads/opencv/modules/stitching/include/opencv2/stitching/detail/matchers.hpp:52:42: fatal error: opencv2/xfeatures2d/cuda.hpp: No such file or directory

xxfeature2d cannot find cuda.hpp, but I already diabled CUDA. So disappointed. How to get rid of the problem caused by xfeature2d?

@berak
Copy link
Contributor

berak commented Jul 28, 2017

sorry, idk. if you can't solve it, this should probably go into a new issue.

@lucasjinreal
Copy link
Author

Hi, berak, I find that all those things needed by xfeature are all failed to download:

├───boostdesc
    │       0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
    │       0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
    │       202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
    │       232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
    │       324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
    │       98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
    │       e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
    │
    └───vgg
            151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
            7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
            7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
            e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i]

How to download them all. It seems this url not end with exactly file name:

https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i 

I find those file names under opencv/.cache/xfeature2d, but just empty files, I think I have to manually download them, any idea about this?

@alalek
Copy link
Member

alalek commented Jul 29, 2017

Try to use fresh CMake version it should support https protocol (at least for files downloading).

@lysukhin
Copy link

To note, after I downloaded and pasted the boostdesc_* files, the same error was raised but with vgg_generated* ones. These can be downloaded from here.

@dearbar
Copy link

dearbar commented Sep 30, 2017

same issue。
My .cache file as shown, but still there will be a problem fatal error: boostdesc_bgm.i: No such file or directory.

├───boostdesc
│ 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
│ 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
│ 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
│ 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
│ 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
│ 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
│ e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i

└───vgg
151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i]

At the same time, I would like to know these operations is not meant to fix the failure to download the problem?

#missing "/Users/apple/opencv-3.3.0/build/downloads/xfeatures2d/boostdesc_bgm_bi.i" #check_md5 "/Users/apple/opencv-3.3.0/.cache/xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i"
#copy "/Users/apple/opencv-3.3.0/build/downloads/xfeatures2d/boostdesc_bgm_bi.i" "/Users/apple/opencv-3.3.0/.cache/xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i" do_copy "boostdesc_bgm_hd.i" "324426a24fa56ad9c5b8e3e0b3e5303e" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i" "/Users/apple/opencv-3.3.0/build/downloads/xfeatures2d"

What operations do I need to be able to compile?

@Firststep2014
Copy link

Firststep2014 commented Aug 1, 2018

@berak hello,thanks for your reply,i guess the last filename should be e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i instead of e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i]

Meanwhile ,i've tried much time soloving this issues,but still can't pass through,could you help to check and give some advice.
Here is some imformations of the issue , actually seems like dearbar's question


/home/shine/Downloads/opencv_contrib-master/modules/xfeatures2d/src/boostdesc.cpp:653:37: fatal error: boostdesc_bgm.i: No such file or directory
compilation terminated.
modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:91: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed
make[2]: *** [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o] Error 1
CMakeFiles/Makefile2:7310: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/all' failed


image

Actually I've tried another way,but it still does not work
image

@berak
Copy link
Contributor

berak commented Aug 2, 2018

@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

@Firststep2014
Copy link

Firststep2014 commented Aug 2, 2018

@berak OK,thanks,and I've tried copy all the file mannually , it worked

@Meera-C
Copy link

Meera-C commented Sep 13, 2018

@Firststep2014 I am facing a similar problem. Can you please tell me which files you manually copied from where to where?

@aesyungan
Copy link

what is the solution?

@BenbenIO
Copy link

BenbenIO commented Dec 14, 2018

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

@ChrystleMyrnaLobo
Copy link

ChrystleMyrnaLobo commented Jan 14, 2019

My issue was because of proxy. cmake calls curl 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 run cmake and make

Edit:
export http_proxy didn't work because cmake was using its internal curl. Fixed that by adding --system-curl flag to the cmake command

@alalek
Copy link
Member

alalek commented Jan 14, 2019

With network proxy you can try this too:

export HTTP_PROXY=...
export HTTPS_PROXY=...
export http_proxy=${HTTP_PROXY}
export https_proxy=${HTTPS_PROXY}
cmake ...

@mboazak
Copy link

mboazak commented Mar 31, 2019

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 :-)

@sainttelant
Copy link

HI, everyone , i got the new issues as follows, although i 've already downloaded files as you guys mentioned above. and copy them to modules/xfeatures2d/src.

[ 78%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o
In file included from /home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:676:0:
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i: In constructor \u2018cv::xfeatures2d::BoostDesc_Impl::BoostDesc_Impl(int, bool, float)\u2019:
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:4345:86: error: unable to find numeric literal operator \u2018operator""x\u2019
f63, 0x3c0bbeef, 0xbbb0c8d7, 0xba092432, 0xbbc1c08e, 0xbc094c45, 0x3c2bca93, 0x
^~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:677:11: error: expected \u2018}\u2019 before \u2018ini_params\u2019
ini_params( orientQuant, patchSize,
^~~~~~~~~~
In file included from /home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:676:0:
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:9:18: warning: unused variable \u2018nDim\u2019 [-Wunused-variable]
static const int nDim = 64;
^~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:12:18: warning: unused variable \u2018orientQuant\u2019 [-Wunused-variable]
static const int orientQuant = 24;
^~~~~~~~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:15:18: warning: unused variable \u2018patchSize\u2019 [-Wunused-variable]
static const int patchSize = 32;
^~~~~~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:18:18: warning: unused variable \u2018iGradAssignType\u2019 [-Wunused-variable]
static const int iGradAssignType = ASSIGN_SOFT;
^~~~~~~~~~~~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:21:18: warning: unused variable \u2018nWLs\u2019 [-Wunused-variable]
static const int nWLs = 512;
^~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:24:27: warning: unused variable \u2018thresh\u2019 [-Wunused-variable]
static const unsigned int thresh[] =
^~~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:93:18: warning: unused variable \u2018orient\u2019 [-Wunused-variable]
static const int orient[] =
^~~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:162:18: warning: unused variable \u2018y_min\u2019 [-Wunused-variable]
static const int y_min[] =
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:231:18: warning: unused variable \u2018y_max\u2019 [-Wunused-variable]
static const int y_max[] =
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:300:18: warning: unused variable \u2018x_min\u2019 [-Wunused-variable]
static const int x_min[] =
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:369:18: warning: unused variable \u2018x_max\u2019 [-Wunused-variable]
static const int x_max[] =
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:438:27: warning: unused variable \u2018alpha\u2019 [-Wunused-variable]
static const unsigned int alpha[] =
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:507:27: warning: unused variable \u2018beta\u2019 [-Wunused-variable]
static const unsigned int beta[] =
^~~~
modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:91: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed
make[2]: *** [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o] Error 1
CMakeFiles/Makefile2:16780: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/all' failed
make[1]: *** [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

@sainttelant
Copy link

error: unable to find numeric literal operator \u2018operator""x\u2019
f63, 0x3c0bbeef, 0xbbb0c8d7, 0xba092432, 0xbbc1c08e, 0xbc094c45, 0x3c2bca93, 0x
^~

@sainttelant
Copy link

i intend to install opencv3.4.0 in raspberry zero pi,by the way.

@xiaoxuaoj

This comment has been minimized.

@yangyanzhe
Copy link

The same problem. The reason for mine is my cmake does not support protocol which leads to failures in downloading. I used the solution here: https://stackoverflow.com/questions/29816529/unsupported-protocol-while-download-tar-gz-package. That is to rebuild cmake with --system-curl so that it will support protocol and can download files from cmakefiles.

Just copy that solution here:

./bootstrap --system-curl
make
sudo make install

@brian3190
Copy link

brian3190 commented Dec 10, 2019

My solution:

cd opencv <!-- This is where you git cloned your opencv folder -->
vi ./dl.txt

copy #1301 (comment) into ./dl.txt

 <!-- In dl.txt, change "cd ./cache/xfeatures2d/" to "cd ./.cache/xfeatures2d/" -->
<!-- exit ./dl.txt -->
chmod +x dl.txt
./dl.txt
cd ../build
cmake ..
make
sudo make install

your opencv/.cache should look like this:
#1301 (comment)

@lyqqhgzj
Copy link

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

hi @BenbenIO , I have manually downloaded all the files above. My file structure is as follows:
picture 1
YKKWOQLWKARJP6I F9UU1XF
picture 2
D2ATFJ02L)4P6XF 1@GB 9R
there are no more errrors about boostesc, but vgg errors are still there.
Call Stack (most recent call first):
D:/Users/user wpy/Downloads/opencv-lhd-opencv_contrib-3.4.5/opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake:16 (ocv_download)
D:/Users/user wpy/Downloads/opencv-lhd-opencv_contrib-3.4.5/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:9 (download_vgg_descriptors)

what should I do next?

@lyqqhgzj
Copy link

lyqqhgzj commented Feb 15, 2020

@berak OK,thanks,and I've tried copy all the file mannually , it worked

hi @Firststep2014 , so what is the final structure of folder?(
opencv_contrib-3.4.5\opencv_contrib\modules\xfeatures2d or
opencv_contrib-3.4.5\opencv_contrib\modules\xfeatures2d\src or
opencv_contrib-3.4.5\opencv_contrib\modules\xfeatures2d\cmake)

@lyqqhgzj
Copy link

@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.
87 9AB J89WZ}L687HK5{`G

@WWBlueFire
Copy link

Download 48.i-120.i and rename with hash ,but when configure again,the rename files i.e. hash-"+"vgg_generated_48.i , hash-"+"vgg_generated_64.i,hash-"+"vgg_generated_80.i,hash-"+"vgg_generated_120.i are recovered.

image

@leaf918
Copy link

leaf918 commented Apr 23, 2020

I pack them up.
download this and unzip it ,that's ok.
patch__.zip

@a74731248
Copy link

I also meet the same problem, I download them mannually and copy to modules\xfeatures2d\src ,can finally solve this problem.

@laocan
Copy link

laocan commented Jul 18, 2020

you can search "boostdesc_bgm_xxx.i" in .../opencv/build/CMakeDownloadLog.txt
if you get something like this "#do_copy "boostdesc_bgm.i" "0ea90e7a8f3f7876d450e4149c97c74f" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i" "/home/.../build/downloads/xfeatures2d"
maybe something goes wrong during downloading from "";
check again:

ls -al ./build/downloads/xfeatures2d/

files like "*.i" exist, but all are empty.
that means nothing has been downloaded before.
**so, check your access to https://raw.githubusercontent.com **.
for Chinese developers, you can download files from this link with passwd: e1wc
good luck~

@hmf21
Copy link

hmf21 commented Sep 6, 2020

you can search "boostdesc_bgm_xxx.i" in .../opencv/build/CMakeDownloadLog.txt
if you get something like this "#do_copy "boostdesc_bgm.i" "0ea90e7a8f3f7876d450e4149c97c74f" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i" "/home/.../build/downloads/xfeatures2d"
maybe something goes wrong during downloading from "";
check again:

ls -al ./build/downloads/xfeatures2d/

files like "*.i" exist, but all are empty.
that means nothing has been downloaded before.
**so, check your access to https://raw.githubusercontent.com **.
for Chinese developers, you can download files from this link with passwd: e1wc
good luck~

Thank you for leaving the downloading access for Chinese developers. And it helps a lot!

@Willyoung111
Copy link

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

that slove my problem, thx!

@FalconMadhab
Copy link

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

Add these files to the src folder if cache not available

@FatumR
Copy link

FatumR commented Oct 16, 2020

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

@WenyinWei
Copy link

WenyinWei commented Dec 14, 2020

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.

Screenshot from 2020-12-14 21-44-52

Screenshot from 2020-12-14 21-42-51

Why?

Possible reasons:

  1. An unstable network.
  2. Firewall for Chinese users.
  3. Manually installed CMake using internal libcurl without https support by default.
  4. ... (Your supplement welcome)

Solution

@leaf918 's reply resolves my issue quickly. #1301 (comment)

I pack them up.
download this and unzip it ,that's ok.
patch__.zip

The zip file contains two folders named boostdest and vgg respectively. You would probably find that in your /.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.

@liuziangexit
Copy link

Looks like this is because of the Chinese National Firewall. The wall prevent user establishes TCP connection to domain raw.githubusercontent.com.

After using a proxy, everything goes fine in my experience.

@RiteshAnanth
Copy link

RiteshAnanth commented Feb 24, 2021

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.

I am using windows OS, can someone give the solution to the same?

I am facing the below error

C:\OpenCV_Build\opencv_contrib-4.5.1\modules\xfeatures2d\src\vgg.cpp(490,20): fatal error C1083: Cannot open include fi
le: 'vgg_generated_120.i': No such file or directory [C:\OpenCV_Build\build\modules\world\opencv_world.vcxproj]
C:\OpenCV_Build\opencv_contrib-4.5.1\modules\xfeatures2d\src\boostdesc.cpp(654,20): fatal error C1083: Cannot open incl
ude file: 'boostdesc_bgm.i': No such file or directory [C:\OpenCV_Build\build\modules\world\opencv_world.vcxproj]

@huangmeiluan
Copy link

For those of who still suffering from this error. I used a method from link below, which could be a fix:

https://www.tutorialexample.com/fix-raw-githubusercontent-com-is-not-accessed-in-china-and-download-files/

To make it short, append following line into your hosts file:

151.101.8.133 raw.githubusercontent.com

Then try again.

@lingxd
Copy link

lingxd commented Mar 12, 2021

nice

@ppdouble
Copy link

ppdouble commented Aug 21, 2021

For opencv-4.5.3, when run cmake, it generate download_with_curl.sh and download_with_wget.sh in build folder. When some files were failed to download, you can download them manually from these scripts. Just chmod +x the script file. And run one of them manually. Then run cmake again.

You can set proxy to curl in download_with_curl.sh, for example, curl --preproxy socks5://127.0.0.1:1080 --create-dirs --output "/tmp/opencv-cache/xfeatures2d/boostdesc/e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i" see man curl

and you can use tsocks to set socks proxy for wget, for example mkdir -p $(dirname /tmp/opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat) && tsocks wget -O "/tmp/opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat"

@SUBO3
Copy link

SUBO3 commented Dec 22, 2021

i have checked xfeatures2d
I don't lack anything
but its still Jump out of the error
unknown
螢幕擷取畫面 2021-12-22 213037

@conglinyizhi
Copy link

我已经检查了 xfeatures2d 我什么都不缺 但它仍然跳出错误 未知 萤幕撷取画面2021-12-22 213037

在这种情况下,请查看这些文件是否为空,可以通过 ls -l 或者 ll 指令查看,如果是空,那么请考虑前文提到的解决方案

@kalwalt
Copy link

kalwalt commented Oct 23, 2023

I had a similar issue compiling the opencv.js project with docker, at first sight i thought it was a download issue (proxy?) but the problem was that my shell script hadn't the rights to write to opencv/.cache folder so i added privileges to opencv sudo chmod -R 777 opencv that sound akward because i hadn't this issue before.

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