Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775650 - dev-qt/qt5[core, gui, svg, widgets] fails to build and run on non-SSE2 hardware
Summary: dev-qt/qt5[core, gui, svg, widgets] fails to build and run on non-SSE2 hardware
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-03-12 16:25 UTC by unlord
Modified: 2024-03-03 22:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
qt5-build.eclass_no-sse2.patch (qt5-build.eclass-no_sse2.patch,560 bytes, patch)
2021-03-12 16:27 UTC, unlord
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.