Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943402 - dev-qt/qtmultimedia-6.7.3 - .../src/resonance-audio/../3rdparty/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:2702:17: error: invalid parameter combination for AltiVec intrinsic '__builtin_vec_sel'
Summary: dev-qt/qtmultimedia-6.7.3 - .../src/resonance-audio/../3rdparty/eigen/Eigen/s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-14 00:19 UTC by ernsteiswuerfel
Modified: 2024-11-16 21:47 UTC (History)
2 users (show)

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


Attachments
build.log (ppc, 6.7.2-r2) (qtmultimedia-6.7.2-r2:20241113-124058.log,81.06 KB, text/plain)
2024-11-14 00:19 UTC, ernsteiswuerfel
Details
build.log (ppc, 6.7.3) (qtmultimedia-6.7.3:20241113-234213.log,82.70 KB, text/plain)
2024-11-14 00:20 UTC, ernsteiswuerfel
Details
build.log (ppc, 6.8.0) (qtmultimedia-6.8.0:20241114-001004.log,304.53 KB, text/plain)
2024-11-14 00:20 UTC, ernsteiswuerfel
Details
emerge --info (file_943402.txt,5.85 KB, text/plain)
2024-11-14 00:21 UTC, ernsteiswuerfel
Details
qtmultimedia-6.7.3-eigen-ppc-no-vsx.patch (qtmultimedia-6.7.3-eigen-ppc-no-vsx.patch,5.61 KB, patch)
2024-11-14 09:09 UTC, Ionen Wolkens
Details | Diff
build.log (ppc, 6.7.3 + patch) (qtmultimedia-6.7.3:20241114-154741.log,82.56 KB, text/plain)
2024-11-14 22:15 UTC, ernsteiswuerfel
Details
build.log (ppc64, 6.7.3) (qtmultimedia-6.7.3:20241115-152429.log,317.96 KB, text/plain)
2024-11-15 17:48 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-11-14 00:19:55 UTC
Created attachment 908685 [details]
build.log (ppc, 6.7.2-r2)

Same error for 6.7.2-r2, 6.7.3 and 6.8.0:

[...]
[63/170] /usr/bin/powerpc-unknown-linux-gnu-g++ -DEIGEN_MPL2_ONLY -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_AS_CONST -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2_build/src/resonance-audio/BundledResonanceAudio_autogen/include -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/resonance-audio -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/resonance-audio/resonance_audio -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/pffft -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/resonance-audio/third_party/SADIE_hrtf_database/generated -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/eigen -isystem /usr/lib/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6  -O2 -pipe -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -w -fno-exceptions -maltivec -mvsx -Wsuggest-override -MD -MT src/resonance-audio/CMakeFiles/BundledResonanceAudio.dir/__/3rdparty/resonance-audio/platforms/common/utils.cc.o -MF src/resonance-audio/CMakeFiles/BundledResonanceAudio.dir/__/3rdparty/resonance-audio/platforms/common/utils.cc.o.d -o src/resonance-audio/CMakeFiles/BundledResonanceAudio.dir/__/3rdparty/resonance-audio/platforms/common/utils.cc.o -c /var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/3rdparty/resonance-audio/platforms/common/utils.cc
FAILED: src/resonance-audio/CMakeFiles/BundledResonanceAudio.dir/__/3rdparty/resonance-audio/platforms/common/utils.cc.o 
/usr/bin/powerpc-unknown-linux-gnu-g++ -DEIGEN_MPL2_ONLY -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_AS_CONST -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2_build/src/resonance-audio/BundledResonanceAudio_autogen/include -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/resonance-audio -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/resonance-audio/resonance_audio -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/pffft -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/resonance-audio/third_party/SADIE_hrtf_database/generated -I/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/eigen -isystem /usr/lib/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6  -O2 -pipe -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -w -fno-exceptions -maltivec -mvsx -Wsuggest-override -MD -MT src/resonance-audio/CMakeFiles/BundledResonanceAudio.dir/__/3rdparty/resonance-audio/platforms/common/utils.cc.o -MF src/resonance-audio/CMakeFiles/BundledResonanceAudio.dir/__/3rdparty/resonance-audio/platforms/common/utils.cc.o.d -o src/resonance-audio/CMakeFiles/BundledResonanceAudio.dir/__/3rdparty/resonance-audio/platforms/common/utils.cc.o -c /var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/3rdparty/resonance-audio/platforms/common/utils.cc
In file included from /var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/eigen/Eigen/Core:210,
                 from /var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/eigen/Eigen/Dense:1,
                 from /var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/resonance-audio/platforms/common/utils.h:20,
                 from /var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/3rdparty/resonance-audio/platforms/common/utils.cc:17:
/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function 'Packet Eigen::internal::pblend(const Selector<unpacket_traits<T>::size>&, const Packet&, const Packet&) [with Packet = __vector(2) double]':
/var/tmp/portage/dev-qt/qtmultimedia-6.7.2-r2/work/qtmultimedia-everywhere-src-6.7.2/src/resonance-audio/../3rdparty/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:2702:17: error: invalid parameter combination for AltiVec intrinsic '__builtin_vec_sel'
 2702 |   return vec_sel(elsePacket, thenPacket, mask);
      |                 ^
ninja: build stopped: subcommand failed.
 * ERROR: dev-qt/qtmultimedia-6.7.2-r2::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed

Eigen installed is dev-cpp/eigen-3.4.0-r3.
Comment 1 ernsteiswuerfel archtester 2024-11-14 00:20:23 UTC
Created attachment 908686 [details]
build.log (ppc, 6.7.3)
Comment 2 ernsteiswuerfel archtester 2024-11-14 00:20:46 UTC
Created attachment 908687 [details]
build.log (ppc, 6.8.0)
Comment 3 ernsteiswuerfel archtester 2024-11-14 00:21:26 UTC
Created attachment 908688 [details]
emerge --info
Comment 4 Ionen Wolkens gentoo-dev 2024-11-14 09:09:55 UTC
Created attachment 908696 [details, diff]
qtmultimedia-6.7.3-eigen-ppc-no-vsx.patch

fwiw this doesn't use system dev-cpp/eigen, but a bundled 3.4.0 copy (unfortunately doesn't provide an easy way to unbundle), which means it does miss our patches.

This just a guess, but given the failing bit is behind a VSX check I have the feeling we might need eigen-3.4.0-ppc-no-vsx.patch from dev-cpp/eigen. The patch was for VSX-less systems, and I guess CPU_FLAGS_PPC="altivec" not having vsx implies it's your case? (not familiar with ppc hardware)

Either way, I've attached the patch with adjusted paths for qtmultimedia, does it help?
Comment 5 Ionen Wolkens gentoo-dev 2024-11-14 09:25:28 UTC
(In reply to Ionen Wolkens from comment #4)
> Either way, I've attached the patch with adjusted paths for qtmultimedia,
> does it help?
It does fail differently than bug #936107's example, so not 100% sure it's the same issue. If it doesn't help I'd assume it'd fail even if we used system's.

Alternatively, I assume -mno-altivec would let it build (or maybe -mno-vsx works?), which we could do rather than worry about 3rdparty code for now.
Comment 6 Ionen Wolkens gentoo-dev 2024-11-14 09:39:29 UTC
(In reply to Ionen Wolkens from comment #5)
> Alternatively, I assume -mno-altivec would let it build (or maybe -mno-vsx
> works?), which we could do rather than worry about 3rdparty code for now.
(if patch doesn't help, quite possible that something else fixes this already upstream, but eigen hasn't done a release since 2021)
Comment 7 ernsteiswuerfel archtester 2024-11-14 22:15:25 UTC
Created attachment 908719 [details]
build.log (ppc, 6.7.3 + patch)

Thanks for your input! But unfortunately the patch doesn't fix the issue.

Furthermore the build also fails with "-O2 -pipe -mcpu=powerpc" or "-O2 -pipe" only, which does not pull in Altivec (like my previous -mcpu=7450 did). -mno-altivec or -mno-vsx don't change a thing here either..
Comment 8 Ionen Wolkens gentoo-dev 2024-11-14 23:55:53 UTC
Ah, just noticed that it explicitly passes -maltivec -mvsx when building those files (something done by Qt rather than eigen), I assume it's for runtime detection so that's fine per se.

Wonder why this started to fail now though? Pretty sure eigen hasn't changed in ages and it was fine when it got keyworded, maybe related newer gcc? I wouldn't really know.

fwiw it only enables -maltivec with gcc too, and looks like it's doing that for pffft rather than eigen:

# Required by pffft on certain PowerPC archs
qt_internal_extend_target(BundledResonanceAudio CONDITION GCC AND (${CMAKE_SYSTEM_PROCESSOR} MATCHES "(ppc|ppc64)$")
    COMPILE_OPTIONS
        -maltivec
)

--

That aside, as far as a lazy workaround goes I see one more solution:

Does `CPPFLAGS=-DEIGEN_DONT_VECTORIZE emerge -1 qtmultimedia` work?

We already have to do something similar for x86 because it's a mess, and I'd rather not worry about this unless someone really cares and wants to get it fixed in upstream eigen.
Comment 9 Ionen Wolkens gentoo-dev 2024-11-15 00:05:08 UTC
(In reply to Ionen Wolkens from comment #8)
> That aside, as far as a lazy workaround goes I see one more solution:
> 
> Does `CPPFLAGS=-DEIGEN_DONT_VECTORIZE emerge -1 qtmultimedia` work?
Also, ppc64 is fine either way, right? (without the patch, likely won't use it unless can determine it's needed). I'd limit the workaround to `use ppc` if so.
Comment 10 ernsteiswuerfel archtester 2024-11-15 17:47:43 UTC
> (In reply to Ionen Wolkens from comment #8)
> Also, ppc64 is fine either way, right? (without the patch, likely won't use
> it unless can determine it's needed). I'd limit the workaround to `use ppc`
> if so.
Looks like it's not (quite) ok. On my G5 setup it fails with -mcpu=970 or -mcpu=power9 (pulls in Altivec), but builds ok with -mcpu=powerpc64 (default) or no -mcpu= setting at all.
Comment 11 ernsteiswuerfel archtester 2024-11-15 17:48:43 UTC
Created attachment 908747 [details]
build.log (ppc64, 6.7.3)

I'll check the ppc workaround and whether the patch helps on ppc64 tomorrow.
Comment 12 Ionen Wolkens gentoo-dev 2024-11-15 21:30:03 UTC
(In reply to ernsteiswuerfel from comment #11)
> Created attachment 908747 [details]
> build.log (ppc64, 6.7.3)
> 
> I'll check the ppc workaround and whether the patch helps on ppc64 tomorrow.
Thanks, with that error it sounds the like the patch may actually help for ppc64 so it's worth trying.
Comment 13 ernsteiswuerfel archtester 2024-11-16 14:23:08 UTC
(In reply to Ionen Wolkens from comment #12)
> Thanks, with that error it sounds the like the patch may actually help for
> ppc64 so it's worth trying.
I can confirm both:

1. On ppc64 your patch fixes the Altivec issue and I can build with an Altivec -mcpu= setting.

2. On ppc the "CPPFLAGS=-DEIGEN_DONT_VECTORIZE" workaround makes qtmultimedia-6.7.x build despite an Altivec -mcpu= setting.
Comment 14 Ionen Wolkens gentoo-dev 2024-11-16 17:04:04 UTC
Thanks, I'll do both later today then.
Comment 15 Ionen Wolkens gentoo-dev 2024-11-16 21:36:10 UTC
(wasn't the same issue for ppc32, but adding to see also given we did need the patch for ppc64 after all)
Comment 16 Larry the Git Cow gentoo-dev 2024-11-16 21:47:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1abba40bcfa175649b835cc9fab7a4be21e1cad8

commit 1abba40bcfa175649b835cc9fab7a4be21e1cad8
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-11-16 21:30:04 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-11-16 21:46:10 +0000

    dev-qt/qtmultimedia: fix eigen vectorization build fail on ppc+ppc64
    
    Not an ideal "fix" for ppc32, but rather go for a simple workaround
    if it's 32bit arches (esp. ppc32) and it's non-invasive to keep.
    
    Still not quite sure why ppc32 surfaced as an issue now except maybe
    different gcc? The bit about Qt passing -maltivec been there since
    Qt 6.4 (long before we keyworded+stabilized it for ppc) unless I'm
    overlooking something. And then (for the ppc64 issue) dev-cpp/eigen
    only received the vsx patch somewhat recently, albeit that one is
    due to some more specific hardware so it makes more sense.
    
    Closes: https://bugs.gentoo.org/943402
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../qtmultimedia-6.7.3-eigen-ppc-no-vsx.patch      | 152 +++++++++++++++++++++
 dev-qt/qtmultimedia/qtmultimedia-6.7.3.ebuild      |   7 +
 dev-qt/qtmultimedia/qtmultimedia-6.8.0.ebuild      |   7 +
 dev-qt/qtmultimedia/qtmultimedia-6.8.9999.ebuild   |   7 +
 dev-qt/qtmultimedia/qtmultimedia-6.9999.ebuild     |   7 +
 5 files changed, 180 insertions(+)