我正在构建点火(https://ignitionrobotics.org/home)来自带有 gcc-10.1.0 的 Ubuntu 18.04.5 的源代码,似乎某些依赖项丢失或版本错误。以下是我收到的链接器错误:
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFTileRowSize@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFFieldTag@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFCurrentDirectory@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFLastDirectory@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFIsByteSwapped@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFComputeStrip@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libfreeimage.so.3: undefined reference to `TIFFReadTile@LIBTIFF_4.0'
有人可以给我一个线索,哪个库负责这些未定义的引用?是libtiff
下面列出的其中之一吗?
(base) paul@desktop:~$ apt list --installed libtiff*
Listing... Done
libtiff-dev/bionic-updates,bionic-security,now 4.0.9-5ubuntu0.3 amd64 [installed,automatic]
libtiff5/bionic-updates,bionic-security,now 4.0.9-5ubuntu0.3 amd64 [installed,automatic]
libtiff5-dev/bionic-updates,bionic-security,now 4.0.9-5ubuntu0.3 amd64 [installed,automatic]
libtiffxx5/bionic-updates,bionic-security,now 4.0.9-5ubuntu0.3 amd64 [installed,automatic]
有没有办法找出是哪一个?
编辑
额外的变化是,这个项目在另一台具有相似环境的 Ubuntu 18.04.5 PC 上构建得很好,但安装和卸载的库的历史不同,可能有更多。两个系统都会生成相同的列表,除了括号中的地址之外:
(base) paul@desktop:~$ ldd /usr/lib/x86_64-linux-gnu/libfreeimage.so.3
linux-vdso.so.1 (0x00007ffe34c41000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f882e896000)
libjxrglue.so.0 => /usr/lib/x86_64-linux-gnu/libjxrglue.so.0 (0x00007f882e676000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f882e40e000)
libopenjp2.so.7 => /usr/lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007f882e1b8000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f882df86000)
libraw.so.16 => /usr/lib/x86_64-linux-gnu/libraw.so.16 (0x00007f882dcb3000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f882da3c000)
libwebpmux.so.3 => /usr/lib/x86_64-linux-gnu/libwebpmux.so.3 (0x00007f882d832000)
libwebp.so.6 => /usr/lib/x86_64-linux-gnu/libwebp.so.6 (0x00007f882d5c9000)
libIlmImf-2_2.so.22 => /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22 (0x00007f882d105000)
libHalf.so.12 => /usr/lib/x86_64-linux-gnu/libHalf.so.12 (0x00007f882cec2000)
libIex-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12 (0x00007f882cca4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f882ca85000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f882c868000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f882c4ca000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f882c2b2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f882bec1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f882ef19000)
libjpegxr.so.0 => /usr/lib/x86_64-linux-gnu/libjpegxr.so.0 (0x00007f882bc8d000)
liblcms2.so.2 => /usr/lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007f882ba35000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f882b7f6000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f882b5d0000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f882b3c2000)
libIlmThread-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12 (0x00007f882b1bb000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f882afb7000)