0

/usr/lib/x86_64-linux-gnu contains over 1000 useful libraries. One expects to be able to access them using the -l option in gcc where -lfoo means "insert library libfoo.so".

But many common libraries don't have .so at the end of their names; for example -ltiff does not work (in spite of appearing in umpteen Makefiles for free software). The reason is that all that is provided is

    libtiff.so.5 which is a soft link to
    libtiff.so.5.3.0 

there is no libtiff.so which would be a soft link to libtiff.so.5. Likewise -ljpeg' does not work (and there are dozens of others), but -lpng` if fine becuase it provides

    libpng.so which is a soft link to
    libpng16.so which is a soft link to
    libpng16.so.16.34.0

Why can't all libraries be provided in that form?

  • 1
    /usr/lib/x86_64-linux-gnu/libtiff.so should be a symbolic link to your /usr/lib/x86_64-linux-gnu/libtiff.so.5.3.0 file. Is the corresponding development package (i.e. libtiff5-dev) installed on your system? – steeldriver Sep 19 '20 at 23:42
  • What exactly do you plan to do? Which header file you have included in your source code? Will pkg-config help you to find needed library and headers? – N0rbert Sep 20 '20 at 8:32
0

I found the answer. The softlink libtiff.so is only provided by the libtiff development package (which also inludes the .h files, etc. There is a presumption that if you are compiling code and include -ltiff in the recipe you must be compiling an application using libtiff, which is indeed true, but that does not mean you have any interest in the tiff interface.

In fact, I was compiling xsane, which is a frontend to the sane system (trying to identify a suspected bug), and tiff is just one of its many backends, and I couldn't even get past 'configure' without first downloading the libtiff development stuff. That is ridiculous; life would be much simpler if that softlink were included as a matter of course in the main package of any library of application.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.