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

Bug 936107

Summary: dev-cpp/eigen-3.4.0-r2: Uses VSX unconditionally on ppc{,64}, downstream packages fail to build on VSX-less hardware
Product: Gentoo Linux Reporter: jonys <vidra.jonas>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: PPC   
OS: Linux   
See Also: https://gitlab.com/libeigen/eigen/-/issues/2513
https://gitlab.com/libeigen/eigen/-/merge_requests/1028
https://bugs.gentoo.org/show_bug.cgi?id=943402
https://bugs.gentoo.org/show_bug.cgi?id=936009
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Upstream patch to properly guard VSX use, edited for 3.4.0-r2

Description jonys 2024-07-15 12:44:44 UTC
Created attachment 897667 [details, diff]
Upstream patch to properly guard VSX use, edited for 3.4.0-r2

Both currently available Eigen versions (3.4.0-r1 and 3.4.0-r2) unconditionally use VSX intrinsics when installed on PPC and PPC64 hosts, respecting neither the `altivec` nor `vsx` PPC CPU flags. This causes build failures in packages which use Eigen, such as media-video/movit or kde-apps/step, when built on hardware which doesn't support VSX.

A typical error seen in the downstream package is something along the lines of `error: '__builtin_vsx_cmpge_4si' requires the '-mvsx' option`.

The -9999 Git version already contains a patch, see https://gitlab.com/libeigen/eigen/-/merge_requests/1028 – but some software doesn't build against that version, as it has bumped the compiler requirements to C++14 (see https://bugs.gentoo.org/928157 ) and also apparently introduced some API changes. At least kde-apps/step-24.02.2 currently can't build against eigen-9999, even after passing `MYCMAKEARGS='-DCMAKE_CXX_STANDARD=14'` to the build.

Can we add the patch to 3.4.0-r2 to allow building KDE apps on ppc? I edited it to make it apply cleanly, see the attachment.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-15 12:47:32 UTC
Sure.
Comment 2 Larry the Git Cow gentoo-dev 2024-07-16 23:04:25 UTC
The bug has been closed via the following commit(s):

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

commit c7a9b7d8cdac586964c6f68ba8095ba7471f37b9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-07-16 23:03:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-07-16 23:03:41 +0000

    dev-cpp/eigen: properly guard VSX use
    
    Fixes build on VSX-less ppc* hardware.
    
    Closes: https://bugs.gentoo.org/936107
    Thanks-to: jonys <vidra.jonas@seznam.cz>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-cpp/eigen/eigen-3.4.0-r3.ebuild              | 458 +++++++++++++++++++++++
 dev-cpp/eigen/files/eigen-3.4.0-ppc-no-vsx.patch | 195 ++++++++++
 2 files changed, 653 insertions(+)