caffe compilation: libopencv_highgui undefined reference to TIFF library
2017-03-08 02:32
423 查看
The problem is caused by adding some include and library to makefile.config or adding some environment variable in the user account which are related to opencvs.
One should eliminate the one which actually cause the problem and delete it. And re-login is required to solve this.
But in general, add matlab runtime library to environment variable or makefile.config will cause this problem during compiling caffe.
The problem log is following
/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
//usrCMakeFiles/Makefile2:701: recipe for target ‘tools/CMakeFiles/upgrade_net_proto_text.dir/all’ failed
/make[1]: * [tools/CMakeFiles/upgrade_net_proto_text.dir/all] Error 2
lib/make[1]: * Waiting for unfinished jobs….
x86_64-linux-gnu/libsoxr.so.0: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
collect2: error: ld returned 1 exit status
tools/CMakeFiles/compute_image_mean.dir/build.make:134: recipe for target ‘tools/compute_image_mean’ failed
make[2]: * [tools/compute_image_mean] Error 1
CMakeFiles/Makefile2:473: recipe for target ‘tools/CMakeFiles/compute_image_mean.dir/all’ failed
make[1]: * [tools/CMakeFiles/compute_image_mean.dir/all] Error 2
[ 90%] Linking CXX executable extract_features
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
//usr/lib/x86_64-linux-gnu/libsoxr.so.0: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:134: recipe for target ‘tools/caffe’ failed
make[2]: * [tools/caffe] Error 1
CMakeFiles/Makefile2:663: recipe for target ‘tools/CMakeFiles/caffe.bin.dir/all’ failed
make[1]: * [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
One should eliminate the one which actually cause the problem and delete it. And re-login is required to solve this.
But in general, add matlab runtime library to environment variable or makefile.config will cause this problem during compiling caffe.
The problem log is following
/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadRGBAStrip@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFIsTiled@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFWriteScanline@LIBTIFF_4.0' //usr/lib/x86_64-linux-gnu/libsoxr.so.0: undefined reference toGOMP_parallel@GOMP_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFGetField@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFScanlineSize@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadEncodedTile@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadRGBATile@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFClose@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFRGBAImageOK@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFOpen@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadEncodedStrip@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFSetField@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFSetWarningHandler@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFSetErrorHandler@LIBTIFF_4.0' collect2: error: ld returned 1 exit status tools/CMakeFiles/upgrade_net_proto_text.dir/build.make:134: recipe for target 'tools/upgrade_net_proto_text' failed make[2]: *** [tools/upgrade_net_proto_text] Error 1 /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadRGBAStrip@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFIsTiled@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFWriteScanline@LIBTIFF_4.0’
//usrCMakeFiles/Makefile2:701: recipe for target ‘tools/CMakeFiles/upgrade_net_proto_text.dir/all’ failed
/make[1]: * [tools/CMakeFiles/upgrade_net_proto_text.dir/all] Error 2
lib/make[1]: * Waiting for unfinished jobs….
x86_64-linux-gnu/libsoxr.so.0: undefined reference to
GOMP_parallel@GOMP_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFGetField@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFScanlineSize@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadEncodedTile@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadRGBATile@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFClose@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFRGBAImageOK@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFOpen@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadEncodedStrip@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFSetField@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFSetWarningHandler@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFSetErrorHandler@LIBTIFF_4.0’
collect2: error: ld returned 1 exit status
tools/CMakeFiles/compute_image_mean.dir/build.make:134: recipe for target ‘tools/compute_image_mean’ failed
make[2]: * [tools/compute_image_mean] Error 1
CMakeFiles/Makefile2:473: recipe for target ‘tools/CMakeFiles/compute_image_mean.dir/all’ failed
make[1]: * [tools/CMakeFiles/compute_image_mean.dir/all] Error 2
[ 90%] Linking CXX executable extract_features
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadRGBAStrip@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFIsTiled@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFWriteScanline@LIBTIFF_4.0' //usr/lib/x86_64-linux-gnu/libsoxr.so.0: undefined reference toGOMP_parallel@GOMP_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFGetField@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFScanlineSize@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadEncodedTile@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadRGBATile@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFClose@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFRGBAImageOK@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFOpen@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadEncodedStrip@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFSetField@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFSetWarningHandler@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFSetErrorHandler@LIBTIFF_4.0' collect2: error: ld returned 1 exit status tools/CMakeFiles/extract_features.dir/build.make:134: recipe for target 'tools/extract_features' failed make[2]: *** [tools/extract_features] Error 1 CMakeFiles/Makefile2:739: recipe for target 'tools/CMakeFiles/extract_features.dir/all' failed make[1]: *** [tools/CMakeFiles/extract_features.dir/all] Error 2 [ 90%] Linking CXX executable caffe /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadRGBAStrip@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFIsTiled@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFWriteScanline@LIBTIFF_4.0’
//usr/lib/x86_64-linux-gnu/libsoxr.so.0: undefined reference to
GOMP_parallel@GOMP_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFGetField@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFScanlineSize@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFReadEncodedTile@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadRGBATile@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFClose@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFRGBAImageOK@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFOpen@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFReadEncodedStrip@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFSetField@LIBTIFF_4.0’
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to
TIFFSetWarningHandler@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFSetErrorHandler@LIBTIFF_4.0’
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:134: recipe for target ‘tools/caffe’ failed
make[2]: * [tools/caffe] Error 1
CMakeFiles/Makefile2:663: recipe for target ‘tools/CMakeFiles/caffe.bin.dir/all’ failed
make[1]: * [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
相关文章推荐
- caffe 编译/usr/local/lib/libopencv_highgui.so: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
- /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFIsTiled@LIBTIFF_4.0'
- /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference toTIFFIsTiled@LIBTIFF_4.0'
- make编译时libopencv_highgui.so:undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
- /lib/libQtGui.so: undefined reference to `ts_read_raw'
- arm编译QT4.8.5时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- openCV中 libopencv-nonfree-dev的安装: undefined reference to `cv::initModule_nonfree()'
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- /opt/qtsdk-2010.02/qt/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
- libopencv_gpu.so.2.4: undefined reference to `cv::gpu
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- libopencv_videoio.so: undefined reference to `av_free@LIBAVUTIL_52'
- android-opencv【 undefined reference to 】
- ../thelib/libthelib.so: undefined reference to `dlopen'
- undefined reference to `libiconv
- undefined reference to `libiconv
- undefined reference to 与 /usr/lib/ld: cannot find -l
- error fix undefined reference to libiconv_open'