I need to build both 32 and 64 bit applications that require libtiff-devel to link. I have the 64 bit version installed. If I try to install the 32 bit version, I get an error because both libtiff-devel-4.4.0-8.fc39.i686 and libtiff-devel-4.4.0-8.fc39.x86_64 include /usr/include/tiffconf.h. I didn't have this problem in Fedora 37 and earlier, and I have other packages like libjpeg-turbo-devel with both 32 and 64 bit versions installed even though they share include files. $ sudo dnf install libtiff-devel.i686 Last metadata expiration check: 0:25:52 ago on Thu 07 Dec 2023 01:04:27 PM EST. Dependencies resolved. ================================================================================================================================================================================= Package Architecture Version Repository Size ================================================================================================================================================================================= Installing: libtiff-devel i686 4.4.0-8.fc39 fedora 545 k Transaction Summary ================================================================================================================================================================================= Install 1 Package Total size: 545 k Installed size: 1.7 M Is this ok [y/N]: y Downloading Packages: [SKIPPED] libtiff-devel-4.4.0-8.fc39.i686.rpm: Already downloaded Running transaction check Transaction check succeeded. Running transaction test The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Error: Transaction test error: file /usr/include/tiffconf.h from install of libtiff-devel-4.4.0-8.fc39.i686 conflicts with file from package libtiff-devel-4.4.0-8.fc39.x86_64 libjpeg-turbo-devel (to pick as an example) allows both 32 and 64 bit versions to be installed at once even though they share /usr/include/libjpeg.h . $ rpm -qa | grep libjpeg-turbo-devel libjpeg-turbo-devel-2.1.4-3.fc39.x86_64 libjpeg-turbo-devel-2.1.4-3.fc39.i686 $ sudo dnf provides /usr/include/jpeg jpegint.h jpeglib.h scslaptop55 /tmp/work$ sudo dnf provides /usr/include/jpeglib.h Last metadata expiration check: 0:32:25 ago on Thu 07 Dec 2023 01:04:27 PM EST. libjpeg-turbo-devel-2.1.4-3.fc39.i686 : Headers for the libjpeg-turbo library Repo : @System Matched from: Filename : /usr/include/jpeglib.h libjpeg-turbo-devel-2.1.4-3.fc39.i686 : Headers for the libjpeg-turbo library Repo : fedora Matched from: Filename : /usr/include/jpeglib.h libjpeg-turbo-devel-2.1.4-3.fc39.x86_64 : Headers for the libjpeg-turbo library Repo : @System Matched from: Filename : /usr/include/jpeglib.h libjpeg-turbo-devel-2.1.4-3.fc39.x86_64 : Headers for the libjpeg-turbo library Repo : fedora Matched from: Filename : /usr/include/jpeglib.h Reproducible: Always Steps to Reproduce: 1. sudo dnf install libtiff-devel.x86_64 libtiff-devel.i686 2. 3. Actual Results: Fails with Error: Transaction test error: file /usr/include/tiffconf.h from install of libtiff-devel-4.4.0-8.fc39.i686 conflicts with file from package libtiff-devel-4.4.0-8.fc39.x86_64 Expected Results: Allow both installed at once so I can do both 32 and 64 bit development. It should allow both to be installed at once, the same as other devel packages. If tiffconf.h is different, it could use gcc predefined macros to select 32 or 64 bit targets. I already have both the 32 and 64 bit libtiff runtimes installed. As a work-around, I ran cd /usr/lib/ && sudo ln -s libtiff.so.5 libtiff.so which seems to be enough to get a link. (My applications are in C.) When I looked for solutions on google, this conflict seems to have been introduced in Fedora 38 and causes problems for people trying to update from Fedora 37 or earlier to Fedora 38 or newer because the conflict causes "dnf system-upgrade download --refresh --releasever=39" to fail. In my case, I removed the 32 bit libtiff-devel when I updated from Fedora 37 to 39.
I built tiff-4.6.0 from source for 32 and 64 bits and compared the generated tiffconf.h I started the 32 bit build with CFLAGS=-m32 CPPFLAGS=-m32 LDFLAGS=-m32 CXXFLAGS=-m32 ./configure and the 64 bit build with ./configure then did a make, saved the tiffconf.h, and then did a 'make distclean'. The main difference is TIFF_SSIZE_T, but a predefined compiler macro could select that. The other differences are either because Fedora 39 doesn't provide 32 bit libraries for JBIG, LERC, or LIBDEFLATE or because I haven't installed them. Both gcc and clang set __i386__ for 32 bit compiles and __x86_64__ for 64 bit compiles, so at worst, the libtiff-devel packages could install a corresponding tiffconf-32.h or tiffconf-64.h and share a tiffconf.h that uses __i386__ or __x86_64__ to select which tiffconf-#.h to include. $ diff tiffconf-32.h tiffconf-64.h 48c48 < #define TIFF_SSIZE_T int32_t --- > #define TIFF_SSIZE_T int64_t 79c79 < /* #undef JBIG_SUPPORT */ --- > #define JBIG_SUPPORT 1 82c82 < /* #undef LERC_SUPPORT */ --- > #define LERC_SUPPORT 1 110c110 < /* #undef LIBDEFLATE_SUPPORT */ --- > #define LIBDEFLATE_SUPPORT 1 This seems to be how it was done on RHEL8 where tiffconf.h is #ifndef TIFFCONF_H_MULTILIB #define TIFFCONF_H_MULTILIB #include <bits/wordsize.h> #if __WORDSIZE == 32 # include "tiffconf-32.h" #elif __WORDSIZE == 64 # include "tiffconf-64.h" #else # error "unexpected value for __WORDSIZE macro" #endif #endif $ diff tiffconf-32.h tiffconf-64.h 18c18 < #define TIFF_INT64_T signed long long --- > #define TIFF_INT64_T signed long 30c30 < #define TIFF_UINT64_T unsigned long long --- > #define TIFF_UINT64_T unsigned long 36c36 < #define TIFF_SSIZE_T signed int --- > #define TIFF_SSIZE_T signed long RHEL8 has libtiff-4.0 while Fedora 39 has libtiff-4.4. The newer libtiff moved to using int32_t and int64_t instead of int, long, long long, so the 32 and 64 bit headers have fewer differences. On my Fedora 39 system, I temporarily made the patch $ diff -u tiffconf.h- tiffconf.h --- tiffconf.h- 2023-08-27 20:00:00.000000000 -0400 +++ tiffconf.h 2023-12-07 14:58:51.126175761 -0500 @@ -39,7 +39,11 @@ /* #undef TIFF_UINT8_T */ /* Signed size type */ +#if defined(__i386__) +#define TIFF_SSIZE_T int32_t +#else #define TIFF_SSIZE_T int64_t +#endif /* Compatibility stuff. */
There has been a fix in place for the 32-bit/64-bit header issue going back many releases. However, it depended on the output of `uname -i`, whose behavior changed with Fedora 38. I have made a PR to fix this in rawhide: https://src.fedoraproject.org/rpms/libtiff/pull-request/7
Thanks for looking into the problem! I see what the comment means, on Fedora 39 `uname -i` returns "unknown" while on RHEL 7 and 8 it returns "x86_64", but `uname -m` returns "x86_64" everywhere. Regards, William
FEDORA-2024-5fbec0afbd (libtiff-4.4.0-10.fc39) has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-5fbec0afbd
FEDORA-2024-5fbec0afbd has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-5fbec0afbd` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-5fbec0afbd See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
Thank you! I've already updated to Fedora 40. The problem is on Fedora 40 also. Can you fix it on Fedora 40? Regards, William $ rpm -qa | grep tiff | grep devel libtiff-devel-4.6.0-2.fc40.x86_64 $ sudo dnf install libtiff-devel.i686 Last metadata expiration check: 0:31:24 ago on Thu 24 Oct 2024 08:32:10 AM CEST. Dependencies resolved. ================================================================================================================================================================================= Package Architecture Version Repository Size ================================================================================================================================================================================= Installing: libtiff-devel i686 4.6.0-2.fc40 fedora 259 k Transaction Summary ================================================================================================================================================================================= Install 1 Package Total download size: 259 k Installed size: 709 k Is this ok [y/N]: y Downloading Packages: libtiff-devel-4.6.0-2.fc40.i686.rpm 355 kB/s | 259 kB 00:00 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 282 kB/s | 259 kB 00:00 Running transaction check Transaction check succeeded. Running transaction test The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Error: Transaction test error: file /usr/include/tiffconf.h from install of libtiff-devel-4.6.0-2.fc40.i686 conflicts with file from package libtiff-devel-4.6.0-2.fc40.x86_64
Thanks again!!! It is working on Fedora 40. I was able to install both the 32 and 64 bit versions of libtiff-devel. $ rpm -q libtiff-devel libtiff-devel-4.6.0-5.fc40.1.x86_64 libtiff-devel-4.6.0-5.fc40.1.i686 $ ls -l /usr/include/tiff* -rw-r--r-- 1 root root 59865 Jul 18 2023 /usr/include/tiff.h -rw-r--r-- 1 root root 3977 Oct 23 02:00 /usr/include/tiffconf-32.h -rw-r--r-- 1 root root 3977 Oct 23 02:00 /usr/include/tiffconf-64.h -rw-r--r-- 1 root root 250 Oct 23 02:00 /usr/include/tiffconf.h -rw-r--r-- 1 root root 28488 Sep 5 2023 /usr/include/tiffio.h -rw-r--r-- 1 root root 1525 May 22 2023 /usr/include/tiffio.hxx -rw-r--r-- 1 root root 1415 Oct 23 02:00 /usr/include/tiffvers.h
FEDORA-2024-5fbec0afbd (libtiff-4.4.0-10.fc39) has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.