Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 775650

Summary: dev-qt/qt5[core, gui, svg, widgets] fails to build and run on non-SSE2 hardware
Product: Gentoo Linux Reporter: unlord
Component: EclassesAssignee: Qt Bug Alias <qt>
Status: UNCONFIRMED ---    
Severity: normal CC: sam, Xeha
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=648004
https://bugs.gentoo.org/show_bug.cgi?id=773199
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: qt5-build.eclass_no-sse2.patch

Description unlord 2021-03-12 16:25:09 UTC
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
Comment 1 unlord 2021-03-12 16:27:58 UTC
Created attachment 690999 [details, diff]
qt5-build.eclass_no-sse2.patch

Add support for CPU_FLAGS_X86=-sse2 to qt5-build.eclass
Comment 2 unlord 2021-03-14 15:55:34 UTC
I can confirm that rebuilding all of Qt5 and VLC with this patch fixed the build errors.