1

I'm building Ignition (https://ignitionrobotics.org/home) from source on Ubuntu 18.04.5 with gcc-10.1.0, and it seems that some dependencies are missing or have wrong versions. Here are linker errors I'm getting:

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

Can someone give me a clue, which library is responsible for these undefined references? Is it one of libtiff listed below?

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

Is there a way to find out, which one?

EDIT

The additional twist is that this project builds fine on another Ubuntu 18.04.5 PC with similar environment, but a different history of libraries installed and uninstalled, probably having more of them. Both systems produce identical listings, except of addresses in parentheses:

(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)
2
  • 1
    libfreeimage.so.3 seems to be referencing libtiff4; you have installed libtiff5. Try ldd /usr/lib/x86_64-linux-gnu/libfreeimage.so.3, which will tell you what libraries are missing. Try to install libtiff4 (see apt list libtiff* without --installed). – ridgy Jan 30 at 17:10
  • ldd /usr/lib/x86_64-linux-gnu/libfreeimage.so.3 produces this line: libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f882da3c000). Does it indicate that libtiff5 is acceptable here? It builds with that version on another PC. I will add a note to my question with more detail. – Paul Jurczak Jan 30 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.