Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#44474 - [lib32-gdk-pixbuf2] TIFF support uses an x86_64 specific header file from libtiff

Attached to Project: Community Packages
Opened by Daniel Appelt (daniel.appelt) - Sunday, 05 April 2015, 23:01 GMT
Last edited by Florian Pritz (bluewind) - Monday, 06 April 2015, 20:58 GMT
Task Type Bug Report
Category Packages: Multilib
Status Closed
Assigned To Florian Pritz (bluewind)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



Type TIFF_(U)INT64_T is based on long in lib32-gdk-pixbuf2 but is defined as long long in lib32-libtiff. This breaks software that relies on the consistency of these types between both packages, for example when using GdkPixbufLoader to load TIFF files.

In general, /usr/include/tiffconf.h from package libtiff will differ on i686 and x86_64 systems. Definition of TIFF_(U)INT64_T will use long on x86_64 but long long on i686.
io-tiff.c includes this system header file via line

#include <tiffio.h>

That is the x86_64 specific headers are included here whereas lib32-libtiff will generate its own i686-compatible tiffconf.h from using configure.

Additional info:

* package version: 2.31.3-1
* lib32-libtiff version: 4.0.3-2
* gcc version: 4.9.2-4
* system architecture: AMD64

* gdb output when debugging the attached program with debug enabled versions of lib32-libtiff and lib32-gdk-pixbuf2:

(gdb) info types uint64
All types matching regular expression "uint64":

File /usr/include/stdint.h:
typedef unsigned long long uint64_t;

File /usr/include/tiff.h:
typedef unsigned long uint64;

File /usr/lib32/glib-2.0/include/glibconfig.h:
typedef unsigned long long guint64;

File tiff.h:
typedef unsigned long long uint64;

Steps to reproduce:

Create the attached pixbufloader program on x86_64 using the given Makefile and compare output of

pixbufloader initgraph.tif
pixbufloader32 initgraph.tif

In general, the program should work on any system architecture when compiled with march=native whereas the multilib version fails due to type inconsistencies.

Possible solution:

* libtiff upstream could switch to using stdint.h for type definitions. They will argue that their current system of generating tiffconf.h using configure works on any given system.
* lib32-gdk-pixbuf2 could patch io-tiff.c to include a patched version of /usr/include/tiffconf.h before tiffio.h which defines types such as TIFF_(U)INT64_T on the basis of stdint.h.
This task depends upon

Closed by  Florian Pritz (bluewind)
Monday, 06 April 2015, 20:58 GMT
Reason for closing:  Fixed
Additional comments about closing:  lib32-libtiff 4.0.3-3 and lib32-gdk-pixbuf2 2.31.3-2
Comment by Daniel Appelt (daniel.appelt) - Sunday, 05 April 2015, 23:46 GMT
Please find attached a modified PKGBUILD together with a patch for io-tiff.c and a patched version of tiffconf.h which makes pixbufloader32 work here with TIFF files.
Maybe it would be better to create tiffstdint.h as a patched copy of /usr/include/tiffconf.h.
Comment by Florian Pritz (bluewind) - Monday, 06 April 2015, 16:28 GMT
Please test with lib32-libtiff 4.0.3-3 and lib32-gdk-pixbuf2 2.31.3-2 from [multilib-testing].
Comment by Daniel Appelt (daniel.appelt) - Monday, 06 April 2015, 20:38 GMT
Works like a charm Florian! It seems to me, you have found the best solution to the problem.