View previous topic :: View next topic |
Author |
Message |
dubdinox n00b
Joined: 02 Nov 2024 Posts: 6
|
Posted: Sat Nov 02, 2024 5:15 pm Post subject: dev-qt/qtbase-6.7.3-r2 fails to compile [SOLVED] |
|
|
Hello everyone! I was trying to update my system and for some reason qt failed to compile.
I tried to update by doing:
Code: |
doas emaint -a sync
doas emerge -avuDN @world
|
The outputs of emerge --info '=dev-qt/qtbase-6.7.3-r2::gentoo', emerge -pqv '=dev-qt/qtbase-6.7.3-r2::gentoo' and the build log are available here:
https://paste.rs/UhXsm.txt --info
https://paste.rs/P4PkT.txt -pqv
https://files.offshore.cat/Hd9swBXl.log build log
What should I do?
Last edited by dubdinox on Sat Nov 02, 2024 10:17 pm; edited 3 times in total |
|
Back to top |
|
|
bstaletic Guru
Joined: 05 Apr 2014 Posts: 357
|
Posted: Sat Nov 02, 2024 6:38 pm Post subject: |
|
|
The build log has been truncated. |
|
Back to top |
|
|
dubdinox n00b
Joined: 02 Nov 2024 Posts: 6
|
Posted: Sat Nov 02, 2024 8:14 pm Post subject: |
|
|
Oops, sorry. I've updated the link. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1677 Location: South America
|
Posted: Sat Nov 02, 2024 9:31 pm Post subject: Re: dev-qt/qtbase-6.7.3-r2 fails to compile |
|
|
Here's the failure:
Code: | >>> Configuring source in /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3 ...
...
-- Configure summary:
Building for: linux-g++ (x86_64, CPU features: abm adx aes avx avx2 bmi bmi2 cx16 f16c fma fsgsbase lzcnt movbe pclmul popcnt prfchw rdpid rdrnd rdseed sha sse3 ssse3 sse4a sse4.1 sse4.2 sse4)
...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3 ...
...
[213/748] cd /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/gui && /usr/bin/cmake -E make_directory vulkan && /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/lib64/qt6/libexec/qvkgen /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/gui/vulkan/vk.xml /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/gui/vulkan/licenseheader.h.in /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/gui/vulkan/qvulkanfunctions
FAILED: src/gui/vulkan/qvulkanfunctions.h src/gui/vulkan/qvulkanfunctions_p.h src/gui/vulkan/qvulkanfunctions_p.cpp /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/gui/vulkan/qvulkanfunctions.h /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/gui/vulkan/qvulkanfunctions_p.h /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/gui/vulkan/qvulkanfunctions_p.cpp
cd /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/gui && /usr/bin/cmake -E make_directory vulkan && /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/lib64/qt6/libexec/qvkgen /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/gui/vulkan/vk.xml /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/gui/vulkan/licenseheader.h.in /var/tmp/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/gui/vulkan/qvulkanfunctions
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
Incompatible processor. This Qt build requires the following features:
rdrnd rdseed |
Maybe someone who knows Qt6 better can help. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
dubdinox n00b
Joined: 02 Nov 2024 Posts: 6
|
Posted: Sat Nov 02, 2024 9:37 pm Post subject: Re: dev-qt/qtbase-6.7.3-r2 fails to compile |
|
|
Huh, this doesn't make a lot of sense. I just upgraded my processor today from a Ryzen 5 2600 to a Ryzen 7 3600x (sorry I didn't mention that in the first message) and I thought the architecture would still be amd64.
I guess since it's complaining about missing features I'll try running cpuid2cpuflags and updating again. I'll report back when I do that.
Last edited by dubdinox on Sat Nov 02, 2024 9:50 pm; edited 1 time in total |
|
Back to top |
|
|
dubdinox n00b
Joined: 02 Nov 2024 Posts: 6
|
Posted: Sat Nov 02, 2024 9:46 pm Post subject: Re: dev-qt/qtbase-6.7.3-r2 fails to compile |
|
|
dubdinox wrote: | Huh, this doesn't make a lot of sense. I just upgraded my processor today from a Ryzen 5 2600 to a Ryzen 7 3600x and I thought the architecture would still be amd64.
I guess since it's complaining about missing features I'll try running cpuid2cpuflags and updating again. I'll report back when I do that. |
This did not help. However, I discovered that there's a cpu flag similar to "rdrnd", it's "rdrand". |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2849
|
Posted: Sat Nov 02, 2024 9:55 pm Post subject: |
|
|
"Likely" same as https://bugs.gentoo.org/922498 which is caused when -march=native enables rdrnd but the kernel disables it due to a seemingly buggy implementation for that CPU. You likely have something like that in your dmesg:
Code: | [ 0.000000] RDRAND is not reliable on this platform; disabling. | And "rdrand" probably isn't listed in /proc/cpuinfo after that.
Like the kernel Qt6 doesn't seem to like that, and unfortunately we don't currently have auto-detection for that situation setup to trigger a workaround.
...so you may want to use "-march=native -mno-rdrnd" to stop gcc/clang from enabling it (probably a good idea regardless of Qt6 if it's "not reliable"), in case of Qt6 it will also trigger another workaround which should further ensure it builds fine.
Edit: also rdrnd and rdrand are the same thing, it's just named differently in a few areas (the compiler flag is rdrnd, /proc/cpuinfo is rdrand, etc...) |
|
Back to top |
|
|
dubdinox n00b
Joined: 02 Nov 2024 Posts: 6
|
Posted: Sat Nov 02, 2024 10:05 pm Post subject: |
|
|
Ionen wrote: | ...so you may want to use "-march=native -mno-rdrnd" to stop gcc/clang from enabling it (probably a good idea regardless of Qt6 if it's "not reliable"), in case of Qt6 it will also trigger another workaround which should further ensure it builds fine. |
So I should set the -mno-rdrnd flag, update, and then I can remove it? Or does it have to be there from that point on?
Ionen wrote: | seemingly buggy implementation for that CPU |
Also, I did a bit of googling and found out that updating the microcode might fix that, but reinstalling linux-firmware did not help. Maybe this is because the update is not in the gentoo repositories yet? |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2849
|
Posted: Sat Nov 02, 2024 10:13 pm Post subject: |
|
|
linux-firmware is already at the latest version gentoo's repos (barely 2 weeks old, there's the live ebuild for newer but that's a long shot), whether it can help or not for that specific cpu I don't know.
And yes, it'd have to be kept for as long as it fails to build (for the user in that bug report, it been failing since qtbase-6.6.1 and they still need it today) -- may want to try removing it when the kernel stops giving that message saying that it disables it. Possible that Qt (or Gentoo) will do workarounds eventually but well. |
|
Back to top |
|
|
dubdinox n00b
Joined: 02 Nov 2024 Posts: 6
|
Posted: Sat Nov 02, 2024 10:17 pm Post subject: |
|
|
Alright, thank you for your help. I've set the flag and now qt builds fine. I'll mark the thread as solved. |
|
Back to top |
|
|
|