Using gold as the system linker, app-text/tesseract-3.04.01 (which is stable on amd64) fails to build because its API library references media-libs/tiff symbols yet build scripts do not link against libtiff: /bin/sh ../libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -std=c++11 -lOpenCL -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -O2 -pipe -march=native -o tesseract tesseract-tesseractmain.o libtesseract.la -lrt -llept -lpthread libtool: link: x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -std=c++11 -Wl,-O1 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -O2 -pipe -march=native -o .libs/tesseract tesseract-tesseractmain.o -lOpenCL -Wl,--as-needed ./.libs/libtesseract.so -lrt -llept -lpthread ./.libs/libtesseract.so: error: undefined reference to 'TIFFFdOpen' ./.libs/libtesseract.so: error: undefined reference to 'TIFFGetFieldDefaulted' ./.libs/libtesseract.so: error: undefined reference to 'TIFFGetField' ./.libs/libtesseract.so: error: undefined reference to 'TIFFScanlineSize' ./.libs/libtesseract.so: error: undefined reference to 'TIFFReadRGBAImageOriented' ./.libs/libtesseract.so: error: undefined reference to 'TIFFReadScanline' ./.libs/libtesseract.so: error: undefined reference to 'TIFFClientOpen' ./.libs/libtesseract.so: error: undefined reference to 'TIFFReadDirectory' ./.libs/libtesseract.so: error: undefined reference to 'TIFFCleanup' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:591: tesseract] Error 1 make[2]: Leaving directory '/var/tmp/portage/app-text/tesseract-3.04.01/work/tesseract-3.04.01/api' make[1]: *** [Makefile:480: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/app-text/tesseract-3.04.01/work/tesseract-3.04.01' make: *** [Makefile:389: all] Error 2 Manually adding -ltiff to the list of libraries in api/Makefile allows tesseract to build successfully, then again it is not a proper solution because e.g. the pkg-config file it installs still doesn't list that library.
Thanks for taking this upstream too! 3.05 looks close to release also: https://github.com/tesseract-ocr/tesseract/issues/715 I will see what to do between backport, bump, or both
I added 3.05.00 in tree with backported patch, let's see how this version behaves (minimal tests OK)