Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936107 - dev-cpp/eigen-3.4.0-r2: Uses VSX unconditionally on ppc{,64}, downstream packages fail to build on VSX-less hardware
Summary: dev-cpp/eigen-3.4.0-r2: Uses VSX unconditionally on ppc{,64}, downstream pack...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-07-15 12:44 UTC by jonys
Modified: 2024-07-16 23:04 UTC (History)
1 user (show)

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


Attachments
Upstream patch to properly guard VSX use, edited for 3.4.0-r2 (fix-unconditional-vsx-use.patch,6.78 KB, patch)
2024-07-15 12:44 UTC, jonys
Details | Diff

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