Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Steps for comlete installation

Vivek Sharma edited this page Jul 17, 2017 · 4 revisions

My system configuration: Ubuntu 16.04.2 LTS, Boost 1.58.0, GCC 5.4.0, Cuda 7.5, Cmake 3.5.1

1.) May have make error: with "Imf::Header::Header(int, int, float, Imath::Vec2 const&, float, Imf::LineOrder, Imf::Compression)", referenced from: cv::ExrEncoder::write(cv::Mat const&, std::__1::vector<int, std::__1::allocator > const&) in opencv.a(grfmt_exr.cpp.o) Solution: rebuild OPENCV with -D WITH_OPENEXR=OFF

More specifically, I used OPENCV3.2 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/vsharma/temp/opencv_c3d/install -D WITH_TBB=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_OPENEXR=OFF ..

2.) May have from build error, showing undefined referencecv :to: VideoCapture:cv::set:(VideoCaptureint:,: setdouble()int', Solution: modify makefile modifying LIBRARIES += opencv_core opencv_highgui opencv_imgproc opencv_videoio # removed opencv_video

3.) Rest of things to fix when not using GCC 4.9

3.1) GCC Cuda Version error: COMMENT : #error -- unsupported GNU version! gcc versions later than 4.9 are not supported! sudo nano /usr/local/cuda/include/host_config.h //#error -- unsupported GNU version! gcc versions later than 4.9 are not supported!

3.2) In your Makefile.config add hdf5 link INCLUDE_DIRS := $(PYTHON_INCLUDE)/usr/local/include /usr/include/hdf5/serial LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

3.3) In cmake/Cuda.cmake add this memcpy workaround set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} "-D_FORCE_INLINES" ")

3.4) In Makefile add NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

3.5) In CMakeLists.txt add set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")

3.6) Export Cuda and CuDNN export PATH=/usr/local/cuda-7.5/bin:$PATH export LD_LIBRARY_PATH="/usr/lib/cuda/lib64/:/home/vsharma/Codes/cuDNNv5/lib64/:/usr/local/cuda/lib64/:/home/vsharma/intel/mkl/lib/intel64:/home/vsharma/temp/opencv_c3d/install/lib:$LD_LIBRARY_PATH"

3.7) Finally make, attached is my makefile.config (renamed to makefile.config.txt) for more details

make all -j8, make distribute, make pycaffe, make matcaffe

I hope you find it helpful. Please contact me if you need any help.

best, Vivek

Makefile.config.txt

Clone this wiki locally