Open matanox opened 2 years ago
This issue does not occur when jointly building the 4.2.0 tags of OpenCV and Contrib rather than 4.5.4. But for flexibly catching up as time goes by, I hope it would become possible to build 4.5.4 or subsequent release tags, even on Ubuntu 20.04 ...
In particular, maybe it might be as simple as making contrib use the same copy of LibTiff4 that's being built from source as part of the OpenCV build, or conversely upgrading them both to use LibTiff5, whichever make more sense in the overall of all platforms etc.
A workaround for 4.5.4 as such would be greatly appreciated as well.
liblept.so.5: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
There is 3rdparty library which want to use some own libtiff version. Successful build requires properly configuration with using of the same version of libtiff everywhere (in OpenCV and its dependencies). Refer to CMake scripts how to do that and/or install libtiff development packages.
-DBUILD_TIFF=ON
Using non-default build options means that you understand that you are doing... This flag forces OpenCV to build own libtiff from the embedded source code instead of using "system default".
Possible workaround is -DWITH_TESSERACT=OFF
to drop lept
from dependencies.
This is a configuration issue - it can't be resolved in OpenCV. Build / usage questions should go to Users OpenCV Q/A forum: https://forum.opencv.org/
System information (version)
Build failure description
I am using BUILD_TIFF=ON as on my (Ubuntu 20.04) system the globally installed libtiff is version 5 not 4, so this allows building OpenCV without downgrading from the distro default version of LibTiff. This has indeed avoided linking errors when building OpenCV without contrib in my case. However, building along with OpenCV using the -DBUILD_TIFF flag set to on, seems to still bump into linkage errors relating to LibTiff version 4:
If my hunch after a few hours' battle with linking OpenCV with Contrib is correct, I just wonder whether contrib builds against the LibTiff that gets dynamically built as part of the OpenCV build courtesy of that flag.
That said to be honest, I'm a bit confused seeing the following libtiff linking information for the offending library:
Steps to reproduce