rmagick installation - imagemagick

Hi I have big problem with rmabick installation on CenotOS 5.5 I installed ImageMagick from source and tes it from line command and works ok. What is wrong. Please somebody help me !
[root$server.com RMagick-2.13.1]# ruby setup.rb
---> lib
---> lib/rvg
<--- lib/rvg
<--- lib
---> ext
---> ext/RMagick
/usr/local/bin/ruby /usr/local/src/rmagicks/RMagick-2.13.1/ext/RMagick/extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... * /usr/local/src/rmagicks/RMagick-2.13.1/ext/RMagick/extconf.rb failed *
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=/usr/local/src/rmagicks/RMagick-2.13.1/ext/RMagick
--curdir
--ruby=/usr/local/bin/ruby
/usr/local/lib/ruby/1.9.1/mkmf.rb:368:in try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/1.9.1/mkmf.rb:452:intry_cpp'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:834:in block in have_header'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:693:inblock in checking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in block (2 levels) in postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:inopen'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in block in postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:inopen'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:276:in postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:692:inchecking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:833:in have_header'
from /usr/local/src/rmagicks/RMagick-2.13.1/ext/RMagick/extconf.rb:193:in'
setup.rb:655:in command': system("/usr/local/bin/ruby" "/usr/local/src/rmagicks/RMagick-2.13.1/ext/RMagick/extconf.rb") failed (RuntimeError)
from setup.rb:660:inruby'
from setup.rb:1238:in extconf'
from setup.rb:1230:inconfig_dir_ext'
from setup.rb:1532:in block in traverse'
from setup.rb:1549:indive_into'
from setup.rb:1530:in traverse'
from setup.rb:1534:inblock (2 levels) in traverse'
from setup.rb:1533:in each'
from setup.rb:1533:inblock in traverse'
from setup.rb:1549:in dive_into'
from setup.rb:1530:intraverse'
from setup.rb:1524:in block in exec_task_traverse'
from setup.rb:1519:ineach'
from setup.rb:1519:in exec_task_traverse'
from setup.rb:1223:inexec_config'
from setup.rb:991:in exec_config'
from setup.rb:812:ininvoke'
from setup.rb:772:in invoke'
from setup.rb:1578:in'
------------------------------------ end ruby setup.rb ------------------------------------
Below logs from mkmf.log file
checking for Ruby version >= 1.8.5... -------------------- yes
find_executable: checking for gcc... -------------------- yes
find_executable: checking for Magick-config... -------------------- yes
checking for ImageMagick version >= 6.4.9... -------------------- yes
checking for HDRI disabled version of ImageMagick... -------------------- yes
"gcc -o conftest -I/usr/local/include/ruby-1.9.1/i686-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I/usr/local/src/rmagicks/RMagick-2.13.1/ext/RMagick -I/usr/local/include/ImageMagick -I/usr/local/include/ImageMagick -fopenmp conftest.c -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L/usr/local/lib -L/usr/local/lib -lMagickCore -ltiff -lfreetype -ljpeg -lpng -lbz2 -lz -lm -lgomp -lpthread -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
/usr/local/lib/libMagickCore.so: undefined reference to png_destroy_read_struct#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_write_fn#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_header_ver#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_gAMA#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_bKGD#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_keep_unknown_chunks#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_tRNS#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_read_update_info#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_oFFs#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_free_data#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_text#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_permit_mng_features#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_create_info_struct#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_valid#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_bKGD#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_iCCP#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_cHRM#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_compression_level#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_rowbytes#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_invalid#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_warning#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_PLTE#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_sRGB#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_cHRM#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_malloc#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_compression_strategy#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_io_ptr#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_write_end#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_sBIT#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_y_offset_pixels#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_packing#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_free#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_write_row#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_gAMA#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_read_info#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_write_info#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_create_read_struct_2#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_sRGB#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_PLTE#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_libpng_ver#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_tRNS#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_interlace_handling#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_error_ptr#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_error#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_compression_buffer_size#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_pHYs#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_read_fn#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_compression_mem_level#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_read_row#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_IHDR#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_user_chunk_ptr#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_write_info_before_PLTE#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_sig_bytes#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_read_end#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_IHDR#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_get_x_offset_pixels#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_create_write_struct_2#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_destroy_write_struct#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_get_pHYs#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_iCCP#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to png_set_filter#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference topng_set_text#PNG12_0'
/usr/local/lib/libMagickCore.so: undefined reference to `png_set_read_user_chunk_fn#PNG12_0'
collect2: ld returned 1 exit status
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: int main() {return 0;}
/ end */

Related

undefined reference to raspicam

i have faced some error in camera initialization in geany compiler
g++ $(pkg-config opencv4 --cflags --libs) -o g++ $(pkg-config raspicam --cflags --libs) -o cameratest cameratest.cpp (in directory: /home/pi/Desktop)
/usr/bin/ld: /tmp/cc3JiNr2.o: in function `main':
cameratest.cpp:(.[text+0x14): undefined reference to `raspicam::RaspiCam_Cv::RaspiCam_Cv()'
/usr/bin/ld: cameratest.cpp:(.text+0x3c): undefined reference to `raspicam::RaspiCam_Cv::open()'
/usr/bin/ld: cameratest.cpp:(.text+0x9c): undefined reference to `raspicam::RaspiCam_Cv::getId[abi:cxx11]() const'
/usr/bin/ld: cameratest.cpp:(.text+0xd8): undefined reference to `raspicam::RaspiCam_Cv::~RaspiCam_Cv()'
/usr/bin/ld: cameratest.cpp:(.text+0x108): undefined reference to `raspicam::RaspiCam_Cv::~RaspiCam_Cv()'
collect2: error: ld returned 1 exit status
Compilation failed.

/lib/libmlpack.so.3.4: undefined reference to `dpotrf_'

Linking CXX executable ../../bindings/julia/mlpack/build/bin/generate_jl_sparse_coding
../../../../lib/libmlpack.so.3.4: undefined reference to `dpotrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpotri_'
../../../../lib/libmlpack.so.3.4: undefined reference to `ddot_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbsvx_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgeqrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dposvx_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgemm_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesdd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgels_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dnrm2_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dlansy_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpotrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dtrcon_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dsyevd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbcon_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbtrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dposv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgetri_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgemv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesvd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbtrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dlange_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dtrtrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgecon_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dlangb_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dsyrk_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgetrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesvx_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpbtrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgetrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgelsd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `ilaenv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dsyev_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbsv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dorgqr_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dtrtri_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgtsv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpocon_'
collect2: error: ld returned 1 exit status
src/mlpack/methods/sparse_coding/CMakeFiles/generate_jl_sparse_coding.dir/build.make:119: recipe for target 'src/mlpack/bindings/julia/mlpack/build/bin/generate_jl_sparse_coding' failed
make[2]: *** [src/mlpack/bindings/julia/mlpack/build/bin/generate_jl_sparse_coding] Error 1
CMakeFiles/Makefile2:6388: recipe for target 'src/mlpack/methods/sparse_coding/CMakeFiles/generate_jl_sparse_coding.dir/all' failed
make[1]: *** [src/mlpack/methods/sparse_coding/CMakeFiles/generate_jl_sparse_coding.dir/all] Error 2 Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
I reported the above errors when compiling mlpack with QNX.And I have compiled necessary dependencies like armadillo and boost. I would like to ask why this error is reported? And what should I do?

QNX_HOST environment variable not set

I am compiling mlpack using QNX.Keep reporting the following errors:
CMake Error at CMakeLists.txt:28 (message):QNX_HOST environment variable not set!!!
I have added the following to CMakeLists.txt:
set (QNX_HOST “/data/QNX/qnx700/host/linux”)
set (QNX_TARGET “/data/QNX/qnx700/target/qnx7”)
I first executed the following command:
source /etc/bash.bashrc_qnx qnx_aarch64
source /data/QNX/qnx700/qnxsdp-env.sh
=>
QNX_HOST=/data/QNX/qnx700/host/linux/x86_64
QNX_TARGET=/data/QNX/qnx700/target/qnx7
MAKEFLAGS=-I/data/QNX/qnx700/target/qnx7/usr/include
And cmake .. But sudo make command still report an error–“error: environment variables QNX_HOST and QNX_TARGET not defined”.The following is the content of part document CMakeLists.txt:
set(CMAKE_SYSTEM_NAME QNX)
set(CMAKE_HOST_SYSTEM_NAME QNX)
set(QNX_PROCESSOR arm)
set(CMAKE_SYSTEM_VERSION 7.0.0)
set(CMAKE_CROSSCOMPILING 1)
set( TOOLCHAIN QNX )
set(CMAKE_SYSROOT "$ENV{TOOLCHAIN_PATH}")
#set (QNX_HOST "/data/QNX/qnx700/host/linux")
#set (QNX_TARGET "/data/QNX/qnx700/target/qnx7")
set(QNX_HOST "$ENV{QNX_HOST}")
set(QNX_TARGET "$ENV{QNX_TARGET}")
message(STATUS "*********************************")
message(STATUS "${QNX_HOST}")
message(STATUS "${QNX_TARGET}")
message(STATUS "*********************************")
#Check environment variables
if ("$ENV{QNX_HOST}" STREQUAL "")
#message(FATAL_ERROR "QNX_HOST environment variable not set")
endif()
if ("$ENV{QNX_TARGET}" STREQUAL "")
#message(FATAL_ERROR "QNX_TARGET environment variable not set")
endif()
set(CMAKE_C_COMPILER "/data/QNX/qnx700/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.0.0-gcc")
set(CMAKE_CXX_COMPILER "/data/QNX/qnx700/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.0.0-g++")
#set(CMAKE_CXX_COMPILER "/usr/bin/x86_64-linux-gnu-g++")
set(CMAKE_CXX_STANDARD 14) # C++14...
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
set(CMAKE_CXX_EXTENSIONS ON) #...without compiler extensions like gnu++14
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
When I running make without sudo, it still report an error–-
[ 10%] Linking CXX executable ../../bindings/julia/mlpack/build/bin/generate_jl_sparse_coding
../../../../lib/libmlpack.so.3.4: undefined reference to `dpotrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpotri_'
../../../../lib/libmlpack.so.3.4: undefined reference to `ddot_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbsvx_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgeqrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dposvx_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgemm_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesdd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgels_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dnrm2_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dlansy_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpotrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dtrcon_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dsyevd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbcon_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbtrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dposv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgetri_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgemv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesvd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbtrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dlange_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dtrtrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgecon_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dlangb_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dsyrk_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgetrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgesvx_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpbtrf_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgetrs_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgelsd_'
../../../../lib/libmlpack.so.3.4: undefined reference to `ilaenv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dsyev_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgbsv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dorgqr_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dtrtri_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dgtsv_'
../../../../lib/libmlpack.so.3.4: undefined reference to `dpocon_'
collect2: error: ld returned 1 exit status
src/mlpack/methods/sparse_coding/CMakeFiles/generate_jl_sparse_coding.dir/build.make:119: recipe for target 'src/mlpack/bindings/julia/mlpack/build/bin/generate_jl_sparse_coding' failed
make[2]: *** [src/mlpack/bindings/julia/mlpack/build/bin/generate_jl_sparse_coding] Error 1
CMakeFiles/Makefile2:6388: recipe for target 'src/mlpack/methods/sparse_coding/CMakeFiles/generate_jl_sparse_coding.dir/all' failed
make[1]: *** [src/mlpack/methods/sparse_coding/CMakeFiles/generate_jl_sparse_coding.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
Does anyone know what should I do ?
You need to ensure that you've added the QNX build toolchain to your environment. QNX provides the 'qnxsdp-env.sh' shell script (or qnx-sdp-env.bat for Windows) to set up the toolchain. This will set all appropriate environment variables. Run this script before trying to use any other build commands such as cmake, make, qcc, etc.
Inferring from your example that you're using QNX 7.0 on a Linux host, try:
$ source /data/QNX/qnxsdp-env.sh
$ cmake
Note that source is important: it instructs the shell to run the script such that it can modify the current shell environment, rather than launching it in a subshell. If you run the script without source, the script will have no effect.
Reference: http://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.prog/topic/devel_OS_version.html

Why is cmake linking to opencv in conda environment when I have specified the path to opencv 4 installation?

I'm trying to run the sample dnn program from opencv's website for object detection
Here's what my CMakeLists.txt looks like:
project( IOT_MINI )
set(CMAKE_CXX_STANDARD 14)
SET(OpenCV DIR /usr/local/include/opencv4)
find_package(OpenCV 4 REQUIRED)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
message(STATUS "OpenCV library status:")
message(STATUS " config: ${OpenCV_DIR}")
message(STATUS " version: ${OpenCV_VERSION}")
message(STATUS " libraries: ${OpenCV_LIBS}")
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
add_executable( Dog_detector Dog_detector.cpp )
target_link_libraries( Dog_detector ${OpenCV_LIBS} )
I can successfully find OpenCv 4. cmake .. runs successfully. But while make it links(?) to conda environment.
I don't know how to reproduce this exactly since I have ROS, conda and opencv installed and I don't know what exactly is causing the problem.
$ make
Scanning dependencies of target Dog_detector
[ 50%] Building CXX object CMakeFiles/Dog_detector.dir/Dog_detector.cpp.o
[100%] Linking CXX executable Dog_detector
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: warning: libgtk-x11-2.0.so.0, needed by /usr/local/lib/libopencv_highgui.so.4.0.0, not found (try using -rpath or -rpath-link)
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: warning: libgdk-x11-2.0.so.0, needed by /usr/local/lib/libopencv_highgui.so.4.0.0, not found (try using -rpath or -rpath-link)
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: warning: libcairo.so.2, needed by /usr/local/lib/libopencv_highgui.so.4.0.0, not found (try using -rpath or -rpath-link)
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: warning: libgdk_pixbuf-2.0.so.0, needed by /usr/local/lib/libopencv_highgui.so.4.0.0, not found (try using -rpath or -rpath-link)
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_bus_timed_pop_filtered'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `avio_close#LIBAVFORMAT_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_app_src_push_buffer'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `dc1394_capture_setup'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_set_write_fn#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_window_get_title'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `av_seek_frame#LIBAVFORMAT_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `jas_matrix_destroy'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_widget_new'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `jpeg_destroy_decompress#LIBJPEG_8.0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_core.so.4.0.0: undefined reference to `gzclose'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `jpeg_stdio_src#LIBJPEG_8.0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_file_chooser_set_do_overwrite_confirmation'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_core.so.4.0.0: undefined reference to `gzgets'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `av_frame_free#LIBAVUTIL_55'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_init'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_write_end#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_element_factory_make'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_set_packing#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_element_get_static_pad'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_read_info#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `sws_scale#LIBSWSCALE_4'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `dc1394_get_control_registers'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_read_image#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `sws_getCachedContext#LIBSWSCALE_4'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `Imf_2_2::OutputFile::OutputFile(char const*, Imf_2_2::Header const&, int)'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `av_init_packet#LIBAVCODEC_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `g_cond_timed_wait'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `av_codec_get_tag#LIBAVFORMAT_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `jas_cmprof_createfromclrspc'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `TIFFGetField#LIBTIFF_4.0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `jpeg_default_qtables#LIBJPEG_8.0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_hbox_new'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `TIFFOpen#LIBTIFF_4.0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `dc1394_video_get_supported_modes'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `Imf_2_2::InputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_encoding_container_profile_new'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_bin_iterate_elements'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `av_codec_get_id#LIBAVFORMAT_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `avformat_open_input#LIBAVFORMAT_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_structure_get_string'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `g_value_unset'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_read_end#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `av_frame_alloc#LIBAVUTIL_55'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_is_missing_plugin_message'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_widget_get_events'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `jpeg_write_scanlines#LIBJPEG_8.0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_window_fullscreen'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `g_type_check_class_cast'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `WebPGetFeaturesInternal'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `avformat_write_header#LIBAVFORMAT_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_dnn.so.4.0.0: undefined reference to `powf#GLIBC_2.27'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `avcodec_get_name#LIBAVCODEC_57'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_encoding_container_profile_add_profile'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_core.so.4.0.0: undefined reference to `gzputs'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_bin_iterate_sources'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_set_read_fn#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_hscale_new_with_range'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_get_tRNS#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_dnn.so.4.0.0: undefined reference to `expf#GLIBC_2.27'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_set_compression_level#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gdk_cairo_set_source_pixbuf'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_set_swap#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_videoio.so.4.0.0: undefined reference to `gst_app_sink_get_max_buffers'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_init_io#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.0.0: undefined reference to `png_set_strip_alpha#PNG16_0'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_widget_set_realized'
/home/atmadeep/.conda/envs/AI/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libopencv_highgui.so.4.0.0: undefined reference to `gtk_style_set_background'
... [Shortened for brevity]
collect2: error: ld returned 1 exit status
CMakeFiles/Dog_detector.dir/build.make:98: recipe for target 'Dog_detector' failed
make[2]: *** [Dog_detector] Error 1
CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/Dog_detector.dir/all' failed
make[1]: *** [CMakeFiles/Dog_detector.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

OpenCV-3.0.0-beta failure to build on 32-bits and 64-bits Ubuntu12.04 - IPP symbols undefined

Linking CXX executable ../../bin/opencv_perf_core
../../lib/libopencv_core.so.3.0.0: undefined reference to ippiTranspose_16u_C4IR'
../../lib/libopencv_core.so.3.0.0: undefined reference toippiMean_StdDev_16u_C1R'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to ippiFilterSobelHorizBorder_8u16s_C1R'
../../lib/libopencv_core.so.3.0.0: undefined reference toippiNorm_L2_32f_C4R'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to ippiMulC_16s_C1IRSfs'
../../lib/libopencv_core.so.3.0.0: undefined reference toippiNormDiff_L1_8u_C4R'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to ippiResizeLinear_16u_C3R'
../../lib/libopencv_core.so.3.0.0: undefined reference toippiNormDiff_Inf_32f_C1MR'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to ippiCopySubpixIntersect_8u_C1R'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference toippiErodeBorder_8u_C1R'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `ippiCrossCorrNormGetBufferSize'
You can add that libippicv.a library as simple object file to linker command line at the end. Or, treat it as a library "cc ..... -L 3rdparty/ippicv/unpack/ippicv_lnx/lib/ia32 -lippicv" so as ordinary libraries are used while linking.

Resources