caffe compilation: libopencv

    xiaoxiao2021-03-26  5

    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 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

    转载请注明原文地址: https://ju.6miu.com/read-600431.html

    最新回复(0)