/usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
Opened this issue · 1 comments
我在使用catkin_make命令编译时,总是报这种错误:
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFReadDirectory@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFLastDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFWriteEncodedStrip@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFIsTiled@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFIsByteSwapped@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFFlushData@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFFreeDirectory@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFScanlineSize@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFWriteEncodedTile@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFWriteBufferSetup@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFTileSize@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFRGBAImageOK@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFClose@LIBTIFF_4.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libfontconfig.so.1: undefined reference to
uuid_copy@UUID_1.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFWriteRawStrip@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFSetTagExtender@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFGetFieldDefaulted@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFReadRGBATileExt@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFStripSize@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFMergeFieldInfo@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFSetWarningHandler@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFGetConfiguredCODECs@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgeotiff.so.5: undefined reference to_TIFFmalloc@LIBTIFF_4.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libgeotiff.so.5: undefined reference to
_TIFFmemcpy@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFClientdata@LIBTIFF_4.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libgeotiff.so.5: undefined reference to
_TIFFrealloc@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgeotiff.so.5: undefined reference to_TIFFmemset@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFReadRGBAStripExt@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libfontconfig.so.1: undefined reference touuid_generate_random@UUID_1.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFWriteCheck@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFSetWriteOffset@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFDefaultStripSize@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFIsBigEndian@LIBTIFF_4.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libpoppler.so.97: undefined reference to
TIFFFdOpen@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFWriteScanline@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
_TIFFfree@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFGetField@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFNumberOfStrips@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFWriteDirectory@LIBTIFF_4.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libgdcmMSFF.so.3.0: undefined reference to
uuid_generate@UUID_1.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFReadEncodedTile@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFReadRGBATile@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFClientOpen@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFFlush@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgdcmMSFF.so.3.0: undefined reference touuid_parse@UUID_1.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFErrorExt@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFNumberOfDirectories@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFWriteRawTile@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFCreateDirectory@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFOpen@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFSetSubDirectory@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFUnlinkDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference toTIFFReadEncodedStrip@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFSetField@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFCurrentDirOffset@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFIsCODECConfigured@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFUnsetField@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFDataWidth@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgdcmMSFF.so.3.0: undefined reference touuid_unparse@UUID_1.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFRewriteDirectory@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFGetSizeProc@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFSetErrorHandler@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFSetDirectory@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFReadScanline@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFNumberOfTiles@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to
TIFFReadRGBAStrip@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
make[2]: *** [BEVFusion-ROS-TensorRT/CMakeFiles/bevfusion_node.dir/build.make:1107:/home/dell/OrangeWS/bevfusion_ws/devel/lib/bevfusion/bevfusion_node] 错误 1
make[1]: *** [CMakeFiles/Makefile2:483:BEVFusion-ROS-TensorRT/CMakeFiles/bevfusion_node.dir/all] 错误 2`
搜到的有人说是libtiff版本的问题,需要4.0版本,而系统上没有。我手动下载了4.0的版本,并且使用 ldd /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0
查到libtiff依赖为libtiff.so.5,并将其指向新下载的libtiff.so.5.4.0(原指向为libtiff.so.5.5.0),依然没用。参考用到的链接如下:
https://blog.csdn.net/qq_39779233/article/details/127718188
https://blog.csdn.net/jiaken2660/article/details/117036606
问题依然无法解决,请问大家这个需要特定的opencv版本吗?这个问题如何解决呢?
我是用的opencv-4.2版本