Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0' #9

Open
OrangeJuice3211 opened this issue Mar 26, 2024 · 1 comment

Comments

@OrangeJuice3211
Copy link

OrangeJuice3211 commented Mar 26, 2024

我在使用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 to TIFFWriteEncodedStrip@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 to TIFFIsByteSwapped@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 to TIFFFreeDirectory@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 to TIFFWriteEncodedTile@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 to TIFFTileSize@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 to TIFFClose@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 to TIFFWriteRawStrip@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 to TIFFGetFieldDefaulted@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 to TIFFStripSize@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 to TIFFSetWarningHandler@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 to TIFFClientdata@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 to uuid_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 to TIFFSetWriteOffset@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 to TIFFIsBigEndian@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 to TIFFWriteScanline@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 to TIFFGetField@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 to TIFFWriteDirectory@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 to TIFFReadEncodedTile@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 to TIFFClientOpen@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 to uuid_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 to TIFFNumberOfDirectories@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 to TIFFCreateDirectory@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 to TIFFSetSubDirectory@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 to TIFFReadEncodedStrip@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 to TIFFCurrentDirOffset@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 to TIFFUnsetField@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 to uuid_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 to TIFFGetSizeProc@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 to TIFFSetDirectory@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 to TIFFNumberOfTiles@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版本吗?这个问题如何解决呢?

@OrangeJuice3211 OrangeJuice3211 changed the title 是否需要指定版本的opencv? /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0' Mar 26, 2024
@linClubs
Copy link
Owner

我是用的opencv-4.2版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants