Qt5 has supports building and running on older hardware. The qt5-build.eclass does not check for the presence of SSE2 and disable these instructions with the -no-sse2 configuration flag. This leads to illegal instruction errors like the one below when building on a Pentium III (Coppermine): * Running emake in src/gui make -j1 /var/tmp/portage/dev-qt/qtgui-5.15.2-r1/work/qtbase-everywhere-src-5.15.2_build/src/gui/qvkgen_wrapper.sh /var/tmp/portage/dev-qt/qtgui-5.15.2-r1/work/qtbase-everywhere-src-5.15.2/src/gui/vulkan/vk.xml /var/tmp/portage/dev-qt/qtgui-5.15.2-r1/work/qtbase-everywhere-src-5.15.2/header.LGPL vulkan/qvulkanfunctions make: *** [Makefile:1664: vulkan/qvulkanfunctions.h] Illegal instruction * ERROR: dev-qt/qtgui-5.15.2-r1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-qt/qtgui-5.15.2-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-qt/qtgui-5.15.2-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/work/qtbase-everywhere-src-5.15.2_build/src/gui' * S: '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/work/qtbase-everywhere-src-5.15.2' >>> Failed to emerge dev-qt/qtgui-5.15.2-r1, Log file: >>> '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/temp/build.log' * Messages for package dev-qt/qtcore-5.15.2-r2: * Generated gentoo-qconfig.h is empty * Messages for package dev-qt/qtgui-5.15.2-r1: * ERROR: dev-qt/qtgui-5.15.2-r1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-qt/qtgui-5.15.2-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-qt/qtgui-5.15.2-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/work/qtbase-everywhere-src-5.15.2_build/src/gui' * S: '/var/tmp/portage/dev-qt/qtgui-5.15.2-r1/work/qtbase-everywhere-src-5.15.2' Reproducible: Always Steps to Reproduce: 1. Install gentoo on hardware without SSE2 2. emerge vlc 3. get 'Illegal instruction error' See debian configuration for building on hardware without SSE2: https://salsa.debian.org/qt-kde-team/qt/qtbase/-/blob/master/debian/rules#L48
Created attachment 690999 [details, diff] qt5-build.eclass_no-sse2.patch Add support for CPU_FLAGS_X86=-sse2 to qt5-build.eclass
I can confirm that rebuilding all of Qt5 and VLC with this patch fixed the build errors.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b597cc4cb8832fcc447ae998d4dac6677e0b2918 commit b597cc4cb8832fcc447ae998d4dac6677e0b2918 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-07-02 17:48:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-07-02 17:48:36 +0000 qt5-build.eclass: try to avoid SSE2 where unavailable Rather overdue, but we got there eventually. Closes: https://bugs.gentoo.org/773199 Bug: https://bugs.gentoo.org/552942 Bug: https://bugs.gentoo.org/648004 Bug: https://bugs.gentoo.org/775650 Signed-off-by: Sam James <sam@gentoo.org> eclass/qt5-build.eclass | 3 +++ 1 file changed, 3 insertions(+)