Skip to content

Qt Linux: use Qt's bundled libjpeg and libtiff (6.10.2-rev9) - #407

Open
nickschuetz wants to merge 1 commit into
o3de:mainfrom
nickschuetz:qt-linux-bundled-jpeg-tiff
Open

nickschuetz wants to merge 1 commit into
o3de:mainfrom
nickschuetz:qt-linux-bundled-jpeg-tiff

Conversation

@nickschuetz

Copy link
Copy Markdown
Contributor

In qt-6.10.2-rev8-linux, plugins/imageformats/libqjpeg.so links libjpeg.so.8 and libqtiff.so links libtiff.so.5, the build host's libraries. Fedora ships libjpeg.so.62 and libtiff.so.6, and Ubuntu 24.04 has libtiff6 but no libtiff5, so Qt cannot load those plugins and silently loses JPEG and/or TIFF. In O3DE that shows up as a missing Project Manager background and .jpg textures failing in Asset Processor with "No proper image loader" (o3de/o3de#20213).

This configures Qt with -qt-libjpeg and -qt-tiff, so both plugins use the copies bundled with Qt 6.10.2 (libjpeg-turbo 3.1.3, libtiff 4.7.1) instead of whatever the host has, and bumps the Linux package to 6.10.2-rev9. Once rev9 is uploaded, o3de/o3de needs the matching one-line bump in cmake/3rdParty/Platform/Linux/BuiltInPackages_linux_x86_64.cmake; I can open that when the hash is known.

The Qt 6.11.2 (#402) and 6.12.0 (#406) PRs already build TIFF from the tiff 3p package, but their libqjpeg.so still links libjpeg.so.8 (development's qt-6.11.2-rev1-linux, and the 6.12.0 package from #406's CI run), so they need -qt-libjpeg as well. This PR keeps 6.10.2 to the smallest change.

Testing (2026-10-22, Fedora 44, clang): built qtbase and qtimageformats 6.10.2 from the release tarballs with these two options, on a host with libjpeg-turbo-devel and libtiff-devel installed. Without -qt-libjpeg, configure reports "Using system libjpeg: yes"; with it, "no", and "Using system libtiff: no" with -qt-tiff. The resulting libqjpeg.so and libqtiff.so link no external jpeg or tiff library, and a small QImageReader program loaded both plugins from that build and decoded an engine .jpg and .tif. I did not run the full package build through pull_and_build_from_git.py.

The image format plugins in qt-6.10.2-rev8-linux link the build host's
libjpeg.so.8 (libqjpeg.so) and libtiff.so.5 (libqtiff.so). Distributions
without those sonames, such as Fedora (libjpeg.so.62, libtiff.so.6) and
Ubuntu 24.04 for libtiff, cannot load the plugins, so Qt cannot read JPEG
or TIFF: the Project Manager background is missing and .jpg textures fail
in Asset Processor (o3de/o3de#20213).

Configure with -qt-libjpeg and -qt-tiff so both plugins use the copies
bundled with Qt 6.10.2 (libjpeg-turbo 3.1.3, libtiff 4.7.1), and bump the
Linux package to 6.10.2-rev9.

Signed-off-by: Nick Schuetz <nschuetz@redhat.com>
@EnterTheArcane

Copy link
Copy Markdown
Contributor

I think this is handled now with the Qt 6.12 rev2 5114288

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants