Ask Your Question
2

OpenCV build fails because I cannot download ICV on our build farm

asked 2014-08-27 11:56:04 -0600

wealthychef gravatar image

updated 2014-08-28 09:38:14 -0600

berak gravatar image

Hello, I am able to build OpenCV on our cluster, but our build farm is a different environment. On the build farm, I get the following error during cmake:

-- ICV: Downloading ippicv_linux_20140513.tgz...
CMake Error at 3rdparty/ippicv/downloader.cmake:71 (file):
  file DOWNLOAD HASH mismatch

    for file: [/tmp/dpkg-mkdeb.NSafYgjHYT/src/opencv-3.0.0-alpha/3rdparty/ippicv/downloads/linux-d80cb24f3a565113a9d6dc56344142f6/ippicv_linux_20140513.tgz]
      expected hash: [d80cb24f3a565113a9d6dc56344142f6]
        actual hash: [20d82f68c11c137093b960677093fdac]

Call Stack (most recent call first):
  3rdparty/ippicv/downloader.cmake:108 (_icv_downloader)
  cmake/OpenCVFindIPP.cmake:212 (include)
  cmake/OpenCVFindLibsPerf.cmake:12 (include)
  CMakeLists.txt:449 (include)

What is ICV and how can I skip or avoid this download part? Could I perhaps download the tgz file and put it somewhere and point cmake to it?

Thanks for any help!

edit retag flag offensive close merge delete

Comments

2

I solved this but am not allowed to formally "answer my own question" yet as I am a new user. Here is what I did:

mkdir -p $cvname/3rdparty/ippicv/downloads/linux-d80cb24f3a565113a9d6dc56344142f6
mv ippicv_linux_20140513.tgz $cvname/3rdparty/ippicv/downloads/linux-d80cb24f3a565113a9d6dc56344142f6/
mkdir $cvname-build
pushd $cvname-build

export PATH=$PYTHON_DIR/bin:$CMAKE_DIR/bin:$PATH

$CMAKE_DIR/bin/cmake -D CMAKE_BUILD_TYPE=DEBUG -D CMAKE_INSTALL_PREFIX=$1$prefix -D BUILD_JASPER=ON -D BUILD_JPEG=BOOL -D CMAKE_C_COMPILER=gcc46 -D CMAKE_CXX_COMPILER=g++46 -D CMAKE_VERBOSE_MAKEFILE=ON -D CUDA_NVCC_EXECUTABLE=/opt/cudatoolkit-6.0/bin/nvcc -D PYTHON2_EXECUTABLE=/usr/local/tools/python-2.7.7/bin/python2 -D PYTHON_EXECUTABLE=/usr/local/tools/python-2.7.7/bin/python ../$cvname
wealthychef gravatar imagewealthychef ( 2014-08-27 14:43:13 -0600 )edit

You could download the ipccv package manually and add it to the 3rd party folder OR you could simply build with cmake flag -D WITH_IPP=OFF

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-27 15:23:41 -0600 )edit
1

actually, similar problem on win - the expected md5 b5028a92224ec1fbc554010c52eb3ec8 does not match the real 67d67f25e2e42dd07a7c97497621c89a

(swapping the md5 did not help, it downloads ~30mb and still thinks it's unworthy, - then deletes it again, WTF!)

berak gravatar imageberak ( 2014-08-28 09:37:03 -0600 )edit

@berak, that seems worthwhile to report as a bug :D

StevenPuttemans gravatar imageStevenPuttemans ( 2015-09-08 06:33:22 -0600 )edit

^ that was last year, afaik, it was solved soon after above post.

berak gravatar imageberak ( 2015-09-08 06:35:58 -0600 )edit

O LOL I did not see the date and timestamp having 2014 ...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-09-08 06:37:40 -0600 )edit

how did u solve the problem for windows?

Sanjoo gravatar imageSanjoo ( 2016-10-01 10:17:39 -0600 )edit

For those who are looking for the latest IPPICV, you could try the https://github.com/opencv/opencv_3rdparty/blob/ippicv/master_20151201/ippicv/ippicv_windows_20151201.zip (github link) and download it from there

dev.kram gravatar imagedev.kram ( 2017-01-17 11:04:56 -0600 )edit

@dev.kram can you check your link

LBerger gravatar imageLBerger ( 2017-01-17 11:13:31 -0600 )edit

@LBerger markdown parser in this website seems not working. You could try copy pasting the entire link in your browser. It's working for me and I have able to build the latest opencv from CMake to msvs2017

dev.kram gravatar imagedev.kram ( 2017-01-17 20:45:25 -0600 )edit

2 answers

Sort by » oldest newest most voted
3

answered 2015-12-29 09:54:47 -0600

Greg Kramida gravatar image

updated 2016-05-24 09:09:35 -0600

This can be caused by the way the CMake is set up on your system.

It turns out if CMake does not support the right download protocol, it will download an empty file. When it tries to match the hash of that to what it expects, it obviously fails. Even if the hash is altered to the hash of the empty file, CMake will still fail reporting "protocol not supported." The correct way is to rebuild CMake with local curl library support on your platform, see this SO answer here. This is the proper long-term solution, since the ICV file is sometimes updated, along with the expected hash.

edit flag offensive delete link more

Comments

+1 right on, the CMake I was using (installed from a PPA) was built without SSL support. Perhaps downloader.cmake could be changed to download over HTTP rather than HTTPS...

Amro_ gravatar imageAmro_ ( 2016-01-26 09:12:16 -0600 )edit

@Amro_ why not supply a PR with the suggested fix and see if devs like it?

StevenPuttemans gravatar imageStevenPuttemans ( 2017-01-18 04:31:06 -0600 )edit
1

@StevenPuttemans: sure. Basically this line would be changed. But since GitHub only serves over HTTPS (HTTP will redirect to HTTPS), I guess you would use a CDN like RawGit or Githack..

Amro_ gravatar imageAmro_ ( 2017-01-18 05:14:58 -0600 )edit
1

@StevenPuttemans oh I just noticed if(DEFINED ENV{OPENCV_ICV_URL}) so one could simply set an environment variable to change the download URL without modifying the code.

Amro_ gravatar imageAmro_ ( 2017-01-18 05:19:46 -0600 )edit
0

answered 2015-09-03 12:19:14 -0600

Once one knows the correct hash, one can modify opencv/sources/3rdparty/ippicv/downloader.cmake to expect the correct hash instead of the incorrect hash.

edit flag offensive delete link more

Comments

Seems that does not work, according to the remark of @berak.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-09-08 06:33:45 -0600 )edit

@Pops289, did you actually encounter this problem ?

berak gravatar imageberak ( 2015-09-08 06:38:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-27 11:56:04 -0600

Seen: 26,718 times

Last updated: May 24 '16