alecjacobson/computer-graphics-bounding-volume-hierarchy

Broken Eigen download

Opened this issue · 4 comments

I'm getting the following error when opening this project:

CMake Error at .cache/eigen/eigen-download-prefix/src/eigen-download-stamp/download-eigen-download.cmake:159 (message):
Each download failed!

error: downloading 'http://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz' failed
     status_code: 22
     status_string: "HTTP response code said error"
     log:
     --- LOG BEGIN ---
       Trying 104.192.141.1:80...

use the lastest: LibiglDownloadExternal.cmake file, which can be found on https://github.com/libigl/libigl/blob/master/cmake/LibiglDownloadExternal.cmake
I think this link for Eigen is broken.

I wasn't able to figure out how to get this to work but so I did a search for the URL that we fetch Eigen from in the project. It looks like there are a couple of folders in the libigl external folder that use some bitbucket links. I read online somewhere that sometime in December 2019 Eigen moved from bitbucket to gitlab for hosting git project.

Do this all before you run cmake ..
What you have to do is go to the following files and search for http://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz:
libigl/external/.cache/eigen/CMakeLists.txt
libigl/cmake/LibiglDownloadExternal.cmake
libigl/external/.cache/eigen/eigen-download-prefix/src/eigen-download-stamp/download-eigen-download.cmake
libigl/external/.cache/eigen/eigen-download-prefix/src/eigen-download-stamp/eigen-download-urlinfo.txt

Once you've found these replace the URLs with the new hosted tar + you need to change the md5 hash in some of the files:
https://gitlab.com/libeigen/eigen/-/archive/3.2.10/eigen-3.2.10.tar.gz

The md5 hash should be 8592052beeecd890066b26c02565d548
Although since this might change in the future here's the bash command to generate that

curl -sL https://gitlab.com/libeigen/eigen/-/archive/3.2.10/eigen-3.2.10.tar.gz | md5sum
Of course if the link changes you'll need to update the link ^

I tried what Ben Weisz suggested, but cmake just overwrites any changes you make. Has anyone resolved this issue successfully?

To resolve the issue, just replace in /computer-graphics-bounding-volume-hierarchy/libigl/cmake/LibiglDownloadExternal.cmake
line 53 and 54 with
URL https://gitlab.com/libeigen/eigen/-/archive/3.2.10/eigen-3.2.10.tar.gz
URL_MD5 8592052beeecd890066b26c02565d548

You can verify the md5 as BenWeisz explained above. This has to be done before cmake .. is run