Which LibTIFF to use?
-
You can use the
-Iand-Loptions to pass the path to your custom build of libtiff. -
Ok. Thanks. That makes sense. However, my original question remains: are there any reasons for preferring
-system-libtiffover-qt-libtiff? The only one that I can think of is the ability to use a more recent version of LibTIFF. -
That's the usual yes.
And beside more recent version, there are also the security fixes that may be delivered by distributions.
-
Thanks for confirming.
And now that we have talked about the advantages of using
-system-libtiff, maybe we should also discuss the possible disadvantages? ;-)For example, I can imagine that things do not always work as expected when using a more recent LibTIFF version than the one that comes bundled with Qt? This blog post advises against using -system-libtiff because "sometime images cannot be correctly displayed" and refers to QTBUG-11453 which is about the very similar
-qt-libpngconfigure option.If anyone else experienced similar problems when using their own build of LibTIFF, i would be happy to hear!
-
@SGaist While looking at how we configure and build our Qt 4.8.7 right now, i see not libtiff-related configure options, which means that the default
-system-libtiffis used. However, we are building on Windows and do not specify any-Ior-Loptions. So I am wondering whether the Qt build actually finds a LibTIFF library, and if this is the case, which one is used. Any ideas on how to check that?For the record: in our Qt-install directory, there are files like
qtiff4.dllandqtiffd4.dllunderplugins/imageformats/.Or does
-system-libtiffdefaults to-qt-libtiffif no system libtiff is found? -
If you don't pass anything the configure script will try to use the system library and if it fails to find it fallback to its own version. If you take a look at the output of
configure --helpyou'll see the defaults the configure script will try to use. -
If you don't pass anything the configure script will try to use the system library and if it fails to find it fallback to its own version. If you take a look at the output of
configure --helpyou'll see the defaults the configure script will try to use.@SGaist said in Which LibTIFF to use?:
If you don't pass anything the configure script will try to use the system library and if it fails to find it fallback to its own version.
I just checked this. We are not passing anything TIFF-related to the configure script, which means that we are using the default
-system-libtiff. However, it looks like our system TIFF library is not found, since I noticed that the code underQT_SRC_ROOT\src\3rdparty\libtiffdoes gets built. I checked that by introducing a syntax error insrc\3rdparty\libtiff\libtiff\tif_print.cand then noticing that our Qt build failed when compiling the 3rdparty libtiff project.For as far as I understand it now, I will have to use
-system-libtiffwith the correct-Iand-Loptions to really make sure we are using our own build of the TIFF library. I will try that and report my findings. Stay tuned! ;-) -
Where is your system libtiff located ?
-
@SGaist said in Which LibTIFF to use?:
Where is your system libtiff located ?
We are building on a Windows 7 system using VS2012 and compile LibTIFF ourselves. The header files are in
D:\some\path\to\libtiffand the debug and release.libfiles are inD:\some\path\to\libtiff\vc11. I assume these directories are the ones to use with the-Iand-Loptions for-system-libtiff? (I still haven't found time to try that out, I will report later) -
Yes
AFAIK, Windows doesn't have any system libtiff.