Bug 2099985

Summary: freeimage is broken by libtiff 4.4.0 ABI changes
Product: [Fedora] Fedora Reporter: Aleksei Bavshin <alebastr89>
Component: freeimageAssignee: Bruno Wolff III <bruno>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: bruno, gergely, hobbes1069, i, john, manisandro, rakesh.pandit
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://sourceforge.net/p/freeimage/discussion/36109/thread/2018fdc6e7/
Whiteboard:
Fixed In Version: freeimage-3.19.0-0.10.svn1889.fc36 freeimage-3.19.0-0.10.svn1889.fc35 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-29 02:07:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksei Bavshin 2022-06-22 06:35:16 UTC
Description of problem:
libtiff 4.4.0 removed[1] the private symbol _TIFFDataSize that was referenced by freeimage, and now applications using the library cannot start:

```
% imv /usr/share/backgrounds/default.png
imv-wayland: symbol lookup error: /lib64/libfreeimage.so.3: undefined symbol: _TIFFDataSize
```

Upstream bug report[2] suggests a patch that switches to the replacement public API introduced in 4.4.0:

diff -ru a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp
--- a/Source/Metadata/XTIFF.cpp 2022-05-18 06:56:41.578314458 -0700
+++ b/Source/Metadata/XTIFF.cpp 2022-05-18 12:51:56.674454816 -0700
@@ -749,7 +749,7 @@
 				continue;
 			}
 			// type of storage may differ (e.g. rationnal array vs float array type)
-			if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) {
+			if((unsigned)TIFFFieldSetGetSize(fld) != FreeImage_TagDataWidth(tag_type)) {
 				// skip tag or _TIFFmemcpy will fail
 				continue;
 			}

I can confirm that the patch fixes the issue and imv can start and display .tiff images.


Version-Release number of selected component (if applicable):
freeimage-3.19.0-0.8.svn1889.fc36.x86_64


Additional information:
FreeImage_unbundle.patch adds a forward declaration for _TIFFDataSize which probably should be removed.


[1]: https://gitlab.com/libtiff/libtiff/-/commit/9da3849a51a4114c140105a21ca7a9c05ceff46d
[2]: https://sourceforge.net/p/freeimage/discussion/36109/thread/2018fdc6e7/

Comment 1 Fedora Update System 2022-06-23 12:14:01 UTC
FEDORA-2022-caef6a60a8 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-caef6a60a8

Comment 2 Fedora Update System 2022-06-24 00:50:07 UTC
FEDORA-2022-89339d358e has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-89339d358e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-89339d358e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2022-06-24 02:22:19 UTC
FEDORA-2022-caef6a60a8 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-caef6a60a8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-caef6a60a8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Aleksei Bavshin 2022-06-28 14:12:53 UTC
*** Bug 2101730 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2022-06-29 02:07:11 UTC
FEDORA-2022-89339d358e has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2022-07-02 01:20:00 UTC
FEDORA-2022-caef6a60a8 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.