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

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?

Related

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.

OpenCV compilation error in Fedora 21

I've got OpenCV source code from github and I get the following error when trying to compile it:
/lib64/libavutil.so.54: undefined reference to `clReleaseMemObject#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clReleaseCommandQueue#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clCreateBuffer#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clBuildProgram#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clSetKernelArg#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clGetDeviceIDs#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clEnqueueUnmapMemObject#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clGetPlatformInfo#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clCreateProgramWithSource#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clGetDeviceInfo#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clReleaseContext#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clCreateContextFromType#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clCreateCommandQueue#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clEnqueueMapBuffer#OPENCL_1.0'
/lib64/libavutil.so.54: undefined reference to `clGetPlatformIDs#OPENCL_1.0'
My machine is a laptop with Intel i7 and a GT630M graphics card and I'm using Bumblebee.
Thanks.
If you happen to have CUDA 8.0 installed, this is caused by Nvidia's careless packaging for it, which puts /usr/local/cuda-8.0/targets/x86_64-linux/lib ahead of /usr/lib/x86_64-linux-gnu during compile time and run time.
The quick fix is to use:
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu make
Source: https://github.com/OpenKinect/libfreenect2/issues/804

ROS Roboearth Ubuntu 12.04 vision_opencv linking error

I have tried asking this question on ROS answers with no luck so I am going to try here.
I am trying to compile the ROS Roboearth package and there seem to be some linking errors with vision_opencv.
When I first tried compiling via the instructions provided I was not able to do build because I had old compiler and I did not have Fuerte. So, I upgraded my Ubuntu to 12.04 and updated to ROS Fuerte.
I then realized that 12.04 does not have the required ros-fuerte-vision-opencv2 dependency. So, I compiled and built OpenCV 2.4.3 from source, that went great. I then realized that I am also not able to pull ros-fuerte-vision-opencv which I again got from here, checked out the "fuerte" branch and compiled in /opt/ros/fuerte/stacks/vision_opencv.
Now, when I try to make roboearth via
rosmake roboearth
I get the following linking errors.
Thank you for your help. It may be just my lack of knowledge of C++ but I tried everything from checking dependencies to re-setting the order of compiler flags and dependencies and I just can't seem to get this to work.
[rosmake-1] Starting >>> ar_pose [ make ]
[ rosmake ] Last 40 lines_vision: 30.7 sec ] [ ar_pose: 4.2 sec ] [ 2 Active 47/103 Complete ]
{-------------------------------------------------------------------------------
make[3]: Leaving directory `/home/sasha/ros/stacks/ccny_vision/ar_pose/build'
[ 70%] Built target rosbuild_precompile
make[3]: Entering directory `/home/sasha/ros/stacks/ccny_vision/ar_pose/build'
make[3]: Leaving directory `/home/sasha/ros/stacks/ccny_vision/ar_pose/build'
make[3]: Entering directory `/home/sasha/ros/stacks/ccny_vision/ar_pose/build'
Linking CXX executable ../bin/ar_multi
CMakeFiles/ar_multi.dir/src/ar_multi.o: In function `ar_pose::ARSinglePublisher::arInit()':
/home/sasha/ros/stacks/ccny_vision/ar_pose/src/ar_multi.cpp:140: undefined reference to `cvCreateImage'
CMakeFiles/ar_multi.dir/src/ar_multi.o: In function `CvBridge':
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:67: undefined reference to `cvCreateImageHeader'
CMakeFiles/ar_multi.dir/src/ar_multi.o: In function `~CvBridge':
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:73: undefined reference to `cvReleaseImageHeader'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:78: undefined reference to `cvReleaseImage'
CMakeFiles/ar_multi.dir/src/ar_multi.o: In function `sensor_msgs::CvBridge::reallocIfNeeded_(_IplImage**, CvSize, int, int)':
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:91: undefined reference to `cvReleaseImage'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:97: undefined reference to `cvCreateImage'
CMakeFiles/ar_multi.dir/src/ar_multi.o: In function `sensor_msgs::CvBridge::reallocIfNeeded(_IplImage**, int, int)':
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:109: undefined reference to `cvGetSize'
CMakeFiles/ar_multi.dir/src/ar_multi.o: In function `sensor_msgs::CvBridge::fromImage(sensor_msgs::Image_<std::allocator<void> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:199: undefined reference to `cvInitMatHeader'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:200: undefined reference to `cvGetImage'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:229: undefined reference to `cvCreateMat'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:230: undefined reference to `cvConvertScale'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:236: undefined reference to `cvConvertScale'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:243: undefined reference to `cvCvtColor'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:245: undefined reference to `cvCvtColor'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:247: undefined reference to `cvCvtColor'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:249: undefined reference to `cvCvtColor'
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:253: undefined reference to `cvCvtColor'
CMakeFiles/ar_multi.dir/src/ar_multi.o:/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:255: more undefined references to `cvCvtColor' follow
CMakeFiles/ar_multi.dir/src/ar_multi.o: In function `sensor_msgs::CvBridge::fromImage(sensor_msgs::Image_<std::allocator<void> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/include/cv_bridge/CvBridge.h:293: undefined reference to `cvReleaseMat'
collect2: ld returned 1 exit status
make[3]: *** [../bin/ar_multi] Error 1
make[3]: Leaving directory `/home/sasha/ros/stacks/ccny_vision/ar_pose/build'
make[2]: *** [CMakeFiles/ar_multi.dir/all] Error 2
make[2]: Leaving directory `/home/sasha/ros/stacks/ccny_vision/ar_pose/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/sasha/ros/stacks/ccny_vision/ar_pose/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package ar_pose written to:
[ rosmake ] /home/sasha/.ros/rosmake/rosmake_output-20130212-145046/ar_pose/build_output.log
[rosmake-1] Finished <<< ar_pose [FAIL] [ 4.31 seconds ]
[ rosmake ] Halting due to failure in package ar_pose.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Last 40 lines_vision: 182.3 sec ] [ 1 Active 47/103 Complete ]
{-------------------------------------------------------------------------------
../lib/libObjectDetectorFunctions.so: undefined reference to `cvReleaseMat'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Mat::reshape(int, int, int const*) const'
../lib/libObjectDetectorFunctions.so: undefined reference to `cvSetZero'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::warpPerspective(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Size_<int>, int, int, cv::Scalar_<double> const&)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::getTextSize(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, double, int, int*)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Mat::zeros(int, int, int)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::_InputArray::_InputArray(cv::MatExpr const&)'
../lib/libDVision.so: undefined reference to `cv::read(cv::FileNode const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection()'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::FlannBasedMatcher::train()'
../lib/libObjectDetectorFunctions.so: undefined reference to `cvCvtColor'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::MatConstIterator::seek(int const*, bool)'
../lib/libDVision.so: undefined reference to `cv::FeatureDetector::~FeatureDetector()'
../lib/libDUtilsCV.so: undefined reference to `cv::line(cv::Mat&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
../lib/libDVision.so: undefined reference to `cv::Exception::Exception(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::initUndistortRectifyMap(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::Size_<int>, int, cv::_OutputArray const&, cv::_OutputArray const&)'
../lib/libDVision.so: undefined reference to `cv::WriteStructContext::~WriteStructContext()'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Mat::copySize(cv::Mat const&)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cvCreateImageHeader'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Mat::inv(int) const'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)'
../lib/libDVision.so: undefined reference to `cv::operator<<(cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::flann::IndexParams::~IndexParams()'
../lib/libObjectDetectorFunctions.so: undefined reference to `cvGetSize'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Mat::deallocate()'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::_InputArray::_InputArray(double const&)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cvCreateImage'
../lib/libDUtilsCV.so: undefined reference to `cv::namedWindow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::Algorithm::~Algorithm()'
../lib/libObjectDetectorFunctions.so: undefined reference to `cv::FlannBasedMatcher::FlannBasedMatcher(cv::Ptr<cv::flann::IndexParams> const&, cv::Ptr<cv::flann::SearchParams> const&)'
../lib/libDVision.so: undefined reference to `cv::Algorithm::set(char const*, bool)'
collect2: ld returned 1 exit status
make[3]: *** [../bin/ObjectDetector] Error 1
make[3]: Leaving directory `/home/sasha/ros/stacks/roboearth/re_vision/build'
make[2]: *** [CMakeFiles/ObjectDetector.dir/all] Error 2
make[2]: Leaving directory `/home/sasha/ros/stacks/roboearth/re_vision/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/sasha/ros/stacks/roboearth/re_vision/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package re_vision written to:
[ rosmake ] /home/sasha/.ros/rosmake/rosmake_output-20130212-145046/re_vision/build_output.log
[rosmake-0] Finished <<< re_vision [FAIL] [ 182.31 seconds ]
[ rosmake ] Halting due to failure in package re_vision.
Ok so I was able to solve the problem.
First I did sudo apt-get update and I saw that I was getting the following message:
W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ precise/partner i386 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_partner_binary-i386_Packages)
To resolve this I went to `Synaptic Package Manager-> Settings -> Repositories -> Other Software' and unchecked "Canonical Partners - Added by software center".
Then did sudo apt-get update again. This solved the above problem.
Then, I went to the following file /etc/apt/sources.list.d/ros-latest.list and saw that the url was commented out. I uncommented the following line deb http://packages.ros.org/ros/ubuntu precise main and ran sudo apt-get update again.
After this point I was able to install all of the dependencies which are needed for roboearth and via apt-get and was able to successfully make roboearth with rosmake roboearth

Resources