OpenCV configure with TBB for ARM (Ubuntu, 3.0.63) - opencv

I'm trying to compile OpenCV libs with TBB support for odroid U2 (with Quad core ARM Cortex-A9 MPCore). I have no problem with compile current OpenCV (from github) without TBB. And also I have no problem with compiling TBB libs fron sources - tbb41_20130116oss_src.tgz and I have successfully builded TBB libs:
root#odroid:~/src/tbb41_20130116oss/build/linux_armv7l_gcc_cc4.6_libc2.15_kernel3.0.63_release# ls
arena.d concurrent_queue.o frontend.d libtbbmalloc.so.2 proxy.d scheduler.o task_v2.d tbb_thread.d
arena.o concurrent_queue_v2.d frontend.o libtbbmalloc_proxy.so proxy.o semaphore.d task_v2.o tbb_thread.o
backend.d concurrent_queue_v2.o governor.d libtbbmalloc_proxy.so.2 queuing_mutex.d semaphore.o tbb.def tbbmalloc.d
backend.o concurrent_vector.d governor.o market.d queuing_mutex.o spin_mutex.d tbb_function_replacement.d tbbmalloc.def
backref.d concurrent_vector.o itt_notify.d market.o queuing_rw_mutex.d spin_mutex.o tbb_function_replacement.o tbbmalloc.o
backref.o concurrent_vector_v2.d itt_notify.o mutex.d queuing_rw_mutex.o spin_rw_mutex.d tbb_main.d tbbmallocproxy.def
cache_aligned_allocator.d concurrent_vector_v2.o itt_notify_malloc.d mutex.o reader_writer_lock.d spin_rw_mutex.o tbb_main.o tbbvars.csh
cache_aligned_allocator.o condition_variable.d itt_notify_malloc.o observer_proxy.d reader_writer_lock.o spin_rw_mutex_v2.d tbb_misc.d tbbvars.sh
concurrent_hash_map.d condition_variable.o large_objects.d observer_proxy.o recursive_mutex.d spin_rw_mutex_v2.o tbb_misc.o version_string.ver
concurrent_hash_map.o critical_section.d large_objects.o pipeline.d recursive_mutex.o task.d tbb_misc_ex.d
concurrent_monitor.d critical_section.o libtbb.so pipeline.o rml_tbb.d task.o tbb_misc_ex.o
concurrent_monitor.o dynamic_link.d libtbb.so.2 private_server.d rml_tbb.o task_group_context.d tbb_statistics.d
concurrent_queue.d dynamic_link.o libtbbmalloc.so private_server.o scheduler.d task_group_context.o tbb_statistics.o
root#odroid:~/src/tbb41_20130116oss/build/linux_armv7l_gcc_cc4.6_libc2.15_kernel3.0.63_release#
I can compile my own programm with g++ using this TBB libs, but I can't configure OpenCV to see this TBB libs:
root#odroid:~/src/work/opencv/release# cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_TBB=ON -D CMAKE_INSTALL_PREFIX=/usr/local ..
-- Detected version of GNU GCC: 46 (406)
-- Found OpenEXR: /usr/lib/libIlmImf.so
-- checking for module 'gstreamer-app-0.10'
-- package 'gstreamer-app-0.10' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
-- package 'tbb' not found
[...]
could you explain how I can do this? Thank you!

Try building opencv with the included TBB build (BUILD_TBB=true), works for me on odroid-x2:
cmake -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local/opencv-2.4-ec15d6f383e0aae -DBUILD_TBB:BOOL="1" -DWITH_TBB:BOOL="1" ..
make -j 4
If you do a make install, be sure to copy ./lib/libtbb.so to somewhere where it can be found, otherwise opencv just leaves it there.

Related

cmake .. -G "Visual Studio 16 2019" && msbuild /m expat.sln - failed

I'm trying to build expat library for 64-bit using VS 2019, for integrating with log4cxx. Downloaded the expat from here. Steps mentioned here are only linux. I tried to follow the steps mentioned in the package. But cmake is failing. There is no pre-built library for 64-bit. Below is the output of cmake
c:\> cmake .. -G "Visual Studio 16 2019" && msbuild /m expat.sln
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.16299.
-- The C compiler identification is MSVC 19.24.28316.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - not found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for getrandom
-- Looking for getrandom - not found
-- Looking for arc4random_buf
-- Looking for arc4random_buf - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for off_t
-- Looking for off_t - not found
-- Looking for size_t
-- Looking for size_t - not found
-- Performing Test HAVE_SYSCALL_GETRANDOM
-- Performing Test HAVE_SYSCALL_GETRANDOM - Failed
-- Performing Test FLAG_NO_STRICT_ALIASING
-- Performing Test FLAG_NO_STRICT_ALIASING - Failed
-- Performing Test FLAG_VISIBILITY
-- Performing Test FLAG_VISIBILITY - Failed
-- The CXX compiler identification is MSVC 19.24.28316.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error: File C:/Program Files (x86)/Expat 2.2.9/Source/Changes does not exist.
CMake Error at CMakeLists.txt:478 (configure_file):
configure_file Problem configuring file
-- ===========================================================================
-- Configuration
-- Prefix ..................... C:/Program Files (x86)/expat
-- Build type .................
-- Shared libraries ........... ON
-- Static CRT ................. OFF
-- Character type ............. char (UTF-8)
-- Binary postfix .............
-- Build documentation ........ OFF
-- Build examples ............. ON
-- Build fuzzers .............. OFF
-- Build tests ................ ON
-- Build tools (xmlwf) ........ ON
-- Install files .............. ON
-- Features
-- // Advanced options, changes not advised
-- Attributes info .......... OFF
-- Context bytes ............ 1024
-- DTD support .............. ON
-- Large size ............... OFF
-- Minimum size ............. OFF
-- Namespace support ........ ON
-- Entropy sources
-- rand_s ................... ON
-- ===========================================================================
-- Configuring incomplete, errors occurred!
See also "C:/Program Files (x86)/Expat 2.2.9/Source/build/CMakeFiles/CMakeOutput.log".
See also "C:/Program Files (x86)/Expat 2.2.9/Source/build/CMakeFiles/CMakeError.log".
Looking for suggestion/help in fixing the issue.
Regards,
Vishu
This is issue #409 upstream. It is fixed in libexpat >=2.2.10.

How to find OpenCV installed in /usr/local when building ROS node

I am using ROS Kinetic with OpenCV. I created a node that uses CUDA implemented algorithms of OpenCV (which are not available in the ros-kinetic-opencv3 package) so I compiled OpenCV from source with CUDA enabled and installed it in /usr/local.
To test if my /usr/local installation was working as expected (and if my code was correct) I created a program, outside of ROS, with the following CMakeList.txt:
cmake_minimum_required(VERSION 2.8.3)
project(stereo_algorithms_testing)
set(ENV{OpenCV_DIR} "/usr/local")
find_package(OpenCV REQUIRED)
include_directories(include ${OpenCV_INCLUDE_DIRS})
add_executable(stereo_algorithms main.cpp)
target_link_libraries(stereo_algorithms ${OpenCV_LIBS})
When I run cmake ., I get the following output:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable exact version "8.0")
-- Found OpenCV: /usr/local (found version "3.2.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/degraw/Opencv_testing/stereo_algorithms/test
All is well, and the code runs as expected with no runtime errors.
Now when I use the same code in a ROS node I have the following CMakeList.txt:
cmake_minimum_required(VERSION 2.8.3)
project(depth_calculator)
set(ENV{OpenCV_DIR} "/usr/local")
find_package(OpenCV REQUIRED core highgui calib3d PATHS /usr/local NO_DEFAULT_PATH)
find_package(catkin REQUIRED COMPONENTS cv_bridge image_transport)
catkin_package()
include_directories(include ${OpenCV_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
add_executable(double_image_acq src/double_image_acquisition.cpp)
target_link_libraries(double_image_acq ${OpenCV_LIBS} ${catkin_LIBRARIES})
Notice that I explicitly tell cmake to only look for OpenCV in /usr/local.
The output of catkin_make is:
-- Using CATKIN_DEVEL_PREFIX: /home/degraw/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/degraw/catkin_ws/devel;/usr/local;/opt/ros/kinetic
-- This workspace overlays: /home/degraw/catkin_ws/devel;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/degraw/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.6
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 2 packages in topological order:
-- ~~ - depth_calculator
-- ~~ - zed_wrapper
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'depth_calculator'
-- ==> add_subdirectory(depth_calculator)
-- Found OpenCV: /opt/ros/kinetic (found version "3.2.0") found components: core highgui calib3d
...
...
...
Running command: "make -j4 -l4" in "/home/degraw/catkin_ws/build"
[ 14%] Built target zed_wrapper_gencfg
[ 28%] Linking CXX executable /home/degraw/catkin_ws/devel/lib/depth_calculator/double_image_acq
[ 57%] Built target ZEDWrapper
[ 85%] Built target zed_wrapper_node
CMakeFiles/double_image_acq.dir/src/double_image_acquisition.cpp.o: In function `OpencvDisparityCalculator::callback(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)':
double_image_acquisition.cpp:(.text._ZN25OpencvDisparityCalculator8callbackERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEES9_[_ZN25OpencvDisparityCalculator8callbackERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEES9_]+0x1ad): undefined reference to `cv::cuda::createStereoBM(int, int)'
collect2: error: ld returned 1 exit status
depth_calculator/CMakeFiles/double_image_acq.dir/build.make:175: recipe for target '/home/degraw/catkin_ws/devel/lib/depth_calculator/double_image_acq' failed
make[2]: *** [/home/degraw/catkin_ws/devel/lib/depth_calculator/double_image_acq] Error 1
CMakeFiles/Makefile2:353: recipe for target 'depth_calculator/CMakeFiles/double_image_acq.dir/all' failed
make[1]: *** [depth_calculator/CMakeFiles/double_image_acq.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
Obviously it's a linker issue. It finds the wrong OpenCV (the ROS OpenCV) which does not include the libraries for CUDA.
How can I tell catkin_make to find the OpenCV in /usr/local?

Why cannot I compile the opencv?

I'm using Centos 7.2. I tried to compile and install opencv using cmake.
I run these commands:
git clone https://github.com/opencv/opencv
cd opencv
mkdir -p build
cd build
The problem happens when I run the command:
cmake -D BUILD_opencv_gpu=OFF -D WITH_EIGEN=ON -D WITH_TBB=ON -D WITH_CUDA=OFF -D WITH_1394=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/ghome/mypath/software/try_opencv/installed ..
I have tried many solutions, such as downloading the latest version, compiling with -D BUILD_opencv_ts=0. But none of them helps.
I have been stuck in this problem for hours and I cannot solve it. The problem message is as follows:
-- Detected version of GNU GCC: 48 (408)
-- FP16: Feature disabled
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.7", minimum required is "1.2.3")
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR)
-- Found ZLIB: /lib64/libz.so (found version "1.2.7")
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Checking for module 'gtk+-3.0'
-- No package 'gtk+-3.0' found
-- Checking for module 'gtk+-2.0'
-- No package 'gtk+-2.0' found
-- Checking for module 'gstreamer-base-1.0'
-- No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-video-1.0'
-- No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
-- No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
-- No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
-- No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
-- No package 'gstreamer-base-0.10' found
-- Checking for module 'gstreamer-video-0.10'
-- No package 'gstreamer-video-0.10' found
-- Checking for module 'gstreamer-app-0.10'
-- No package 'gstreamer-app-0.10' found
-- Checking for module 'gstreamer-riff-0.10'
-- No package 'gstreamer-riff-0.10' found
-- Checking for module 'gstreamer-pbutils-0.10'
-- No package 'gstreamer-pbutils-0.10' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
-- No package 'libavcodec' found
-- No package 'libavformat' found
-- No package 'libavutil' found
-- No package 'libswscale' found
-- Checking for module 'libavresample'
-- No package 'libavresample' found
-- Checking for module 'libgphoto2'
-- No package 'libgphoto2' found
CMake Warning at 3rdparty/ippicv/downloader.cmake:56 (message):
ICV: Local copy of ICV package has invalid MD5 hash:
d41d8cd98f00b204e9800998ecf8427e (expected:
808b791a6eac9ed78d32a7666804320e)
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:243 (include)
cmake/OpenCVFindLibsPerf.cmake:37 (include)
CMakeLists.txt:567 (include)
-- ICV: Downloading ippicv_linux_20151201.tgz...
CMake Error at 3rdparty/ippicv/downloader.cmake:73 (file):
file DOWNLOAD HASH mismatch
for file: [/ghome/mypath/software/try_opencv/opencv/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/ippicv_linux_20151201.tgz]
expected hash: [808b791a6eac9ed78d32a7666804320e]
actual hash: [d41d8cd98f00b204e9800998ecf8427e]
status: [1;"Unsupported protocol"]
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:243 (include)
cmake/OpenCVFindLibsPerf.cmake:37 (include)
CMakeLists.txt:567 (include)
CMake Error at 3rdparty/ippicv/downloader.cmake:77 (message):
ICV: Failed to download ICV package: ippicv_linux_20151201.tgz.
Status=1;"Unsupported protocol"
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:243 (include)
cmake/OpenCVFindLibsPerf.cmake:37 (include)
CMakeLists.txt:567 (include)
-- Configuring incomplete, errors occurred!
See also "/ghome/mypath/software/try_opencv/opencv/build/CMakeFiles/CMakeOutput.log".
See also "/ghome/mypath/software/try_opencv/opencv/build/CMakeFiles/CMakeError.log".
Thank you all for helping me!!!
Since the error seems in downloading ippicv, if you don't need it strictly you can simply disable it adding -D WITH_IPP=OFF in your cmake configuration line.
A very similar question was asked here.
It could also be that updating CMake might solve the problem. To do so, if you are in a Linux environment, consider this guide.

CMake download issue when building OpenCV behind proxy

I'm trying to install OpenCV 3.1.0 (with contrib) on CentOS 7 behind a proxy. I get download errors for the 3rd party libraries. I've tried setting the HTTP_PROXY (also http_proxy, https_proxy, ftp_proxy and their uppercase versions) environment variable but it doesn't make a difference. Here's the command I use:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON \
-D BUILD_OPENCV_PYTHON2=ON ..
And here's the error I get:
-- Detected version of GNU GCC: 48 (408)
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.7", minimum required is "1.2.3")
-- Found ZLIB: /lib64/libz.so (found version "1.2.7")
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
-- package 'gtk+-3.0' not found
-- checking for module 'gstreamer-base-1.0'
-- package 'gstreamer-base-1.0' not found
-- checking for module 'gstreamer-video-1.0'
-- package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
-- package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
-- package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
-- package 'gstreamer-pbutils-1.0' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
-- package 'libavcodec' not found
-- checking for module 'libavformat'
-- package 'libavformat' not found
-- checking for module 'libavutil'
-- package 'libavutil' not found
-- checking for module 'libswscale'
-- package 'libswscale' not found
-- checking for module 'libavresample'
-- package 'libavresample' not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'libgphoto2'
-- package 'libgphoto2' not found
CMake Warning at 3rdparty/ippicv/downloader.cmake:56 (message):
ICV: Local copy of ICV package has invalid MD5 hash:
d41d8cd98f00b204e9800998ecf8427e (expected:
808b791a6eac9ed78d32a7666804320e)
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:237 (include)
cmake/OpenCVFindLibsPerf.cmake:12 (include)
CMakeLists.txt:537 (include)
-- ICV: Downloading ippicv_linux_20151201.tgz...
CMake Error at 3rdparty/ippicv/downloader.cmake:73 (file):
file DOWNLOAD HASH mismatch
for file: [/home/hal/opencv/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/ippicv_linux_20151201.tgz]
expected hash: [808b791a6eac9ed78d32a7666804320e]
actual hash: [d41d8cd98f00b204e9800998ecf8427e]
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:237 (include)
cmake/OpenCVFindLibsPerf.cmake:12 (include)
CMakeLists.txt:537 (include)
CMake Error at 3rdparty/ippicv/downloader.cmake:77 (message):
ICV: Failed to download ICV package: ippicv_linux_20151201.tgz.
Status=7;"Couldn't connect to server"
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:237 (include)
cmake/OpenCVFindLibsPerf.cmake:12 (include)
CMakeLists.txt:537 (include)
-- Configuring incomplete, errors occurred!

An error when install cutorch in Torch7 with LuaRocks install in Ubuntu 14.0

i`m new to lua, and these days i just have installing the torch-7, when i install the cutorch an error happened :
weigq#weigq-Lenovo-G410:~/torch$ luarocks install cutorch
Installing https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... switching to 'build' mode
正克隆到 'cutorch'...
remote: Counting objects: 203, done.
remote: Compressing objects: 100% (158/158), done.
remote: Total 203 (delta 57), reused 86 (delta 43), pack-reused 0
接收对象中: 100% (203/203), 191.70 KiB | 185.00 KiB/s, done.
处理 delta 中: 100% (57/57), done.
检查连接... 完成。
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/weigq/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/weigq/torch/install/lib/luarocks/rocks/cutorch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN) install
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Torch7 in /home/weigq/torch/install
CMake Error at /usr/share/cmake-2.8/Modules/FindCUDA.cmake:548 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
CMakeLists.txt:7 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_cutorch-scm-1-8668/cutorch/build/CMakeFiles/CMakeOutput.log".
Error: Build error: Failed building.
i don`t know how to deal with it ?
anyone can help me solve it,thanks!
Make sure You're using NVidia graphic card and do have driver and CUDA toolkit set-up.
$ lspci | grep -i 'vga\|3d\|2d'
Should print the information about video card installed into Your machine.
If it's not NVidia and/or it only supports OpenCL, You could try cltorch (Torch OpenCL backend) or some another lower level framework, which does support OpenCL.
Btw, setting up the CUDA toolkit includes downloading and installing it from the official site and setting up the search paths (accordingly to your installation method). Example from CUDA quick guide:
$ export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
$ export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Resources