Skip to content

qt: do not let rcc to compress resources using zstd if qt can not decompress zstd

Fatih Uzunoğlu requested to merge fuzun/vlc:qt/rccdontusezstd into master

Starting with Qt 6, RCC uses zstd by default. If Qt is built without zstd, it does not have the ability to decompress zstd.

This is mainly a problem when host tools are outsourced. For example, currently we don't provide zstd to Qt in the contribs, so it does not support compressing (rcc) or decompressing (libqtcore) zstd. However, the script that determines the host tools only check for version and does not check for feature mismatch (contrib/main.mak). Not only that, it also prioritizes the system than the contribs even if tools exist in the contribs.

Because of this reason, host tools are picked from the system. In my case, my system RCC was built with zstd support, so it uses zstd compression by default. However, contrib Qt does not support zstd.

If this occurs with static Qt, it leads to build failure due to undefined reference. If this occurs with dynamic Qt, I assume that it would cause runtime error.

Qt's officially supported build systems seem to already check if Qt supports decompressing zstd and adjust the rcc invocation (mkspecs/features/resources.prf). In this patch, I propose doing the same for our unofficial Autotools and Meson build systems for the Qt module.

Request review @robUx4.

Merge request reports

Loading