mercurial install on debian 9.1 (stretch), libtiff issues, solved.

Added by Darija Tadin about 6 years ago

In case someone else runs into the a similar problem, this is what I did to install AMC 1.3.0+hg2018-02-10 on a Linux 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux machine.

First, make failed with:

/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFOpen@LIBTIFF_4.0'
 [...]
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
Makefile:124: recipe for target 'AMC-detect' failed
make[3]: *** [AMC-detect] Error 1
make[3]: Leaving directory '/home/username/builds/auto-multiple-choice/tmp/auto-multiple-choice-1.3.0+hg2018-02-10'
dh_auto_build: make -j1 returned exit code 2
debian/rules:7: recipe for target 'build' failed

Installing various libtiff packages from debian repos was to no effect.

Finally I downloaded tiff-4.0.9.tar.gz from http://download.osgeo.org/libtiff/, unpacked, did a ./configure and a make. Added the new libraries' path to LD_LIBRARY_PATH:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/tiff-4.0.9/libtiff/.libs && export LD_LIBRARY_PATH

... got back to AMC's make deb and all was, finally, well with the world again.

To everyone involved in creating and maintaining AMC: thank you.


Replies (3)

RE: mercurial install on debian 9.1 (stretch), libtiff issues, solved. - Added by Alexis Bienvenüe about 6 years ago

Can you post the result of the following commands? (to know what is your debian version, and the version of the installed debian packages related to OpenCV)

cat /etc/debian_version
dpkg -l '*opencv*' '*tiff*' | grep '^i'

RE: mercurial install on debian 9.1 (stretch), libtiff issues, solved. - Added by Darija Tadin about 6 years ago

The debian version is as in the title: 9.1. The complete log is attached.

My guess is that the problem is that there is no libtiff4-dev available anymore:

$ sudo apt install libtiff4-dev
[sudo] password for darki: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libtiff4-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libtiff5-dev:i386 libtiff5-dev

E: Package 'libtiff4-dev' has no installation candidate

dpkg-l_opencv_tiff.log - LOG: /etc/debian_version and dpkg -l '*opencv*' '*tiff*' | grep '^i' (5.6 kB)

RE: mercurial install on debian 9.1 (stretch), libtiff issues, solved. - Added by Alexis Bienvenüe about 6 years ago

Thanks.
I tried from a fresh debian stretch (9.3), and all went OK. Attached are the OpenCV/libtiff versions installed.
So I'm not sure where the problem comes from…
Thanks again for the report, that can help other users!

debian9.3.log (4.5 kB)

(1-3/3)