On 2025-11-13 15:27, Trupti wrote:
On 2025-11-13 14:56, Trupti wrote:
Package: src:arb
Version: 6.0.6-8
Severity: serious
Tags: ftbfs forky sid
X-Debbugs-Cc: [email protected]
User: [email protected]
Usertags: ppc64el


Dear maintainer,

arb FTBFS on ppc64el with below error:

../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h: In
function 'typename Eigen::ei_packet_traits<T>::type
Eigen::ei_pset1(const Scalar&) [with Scalar = float; typename
ei_packet_traits<T>::type = __vector(4) float]':
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:194:40:
error: declaration does not declare anything [-fpermissive]
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:194:3:
error: expected primary-expression before 'float'
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:195:3:
error: 'af' was not declared in this scope
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:196:18:
error: invalid parameter combination for AltiVec intrinsic
'__builtin_vec_ld'
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h: In
function 'typename Eigen::ei_packet_traits<T>::type
Eigen::ei_pset1(const Scalar&) [with Scalar = int; typename
ei_packet_traits<T>::type = __vector(4) int]':
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:203:38:
error: declaration does not declare anything [-fpermissive]
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:203:3:
error: expected primary-expression before 'int'
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:204:3:
error: 'ai' was not declared in this scope
../HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:205:18:
error: invalid parameter combination for AltiVec intrinsic


Hello,

The ARB package FTBFS on ppc64el with GCC 14+ due to errors in the
Altivec code from the bundled Eigen (eigen-2.0.16).
The errors occur in
HEADERLIBS/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h. These
intrinsics are deprecated on little-endian PowerPC and now rejected by
modern GCC.


Upstream Eigen replaced these deprecated intrinsics with
endian-agnostic equivalents starting around version 3.3.9
Below is the commit of that change.
https://gitlab.com/libeigen/eigen/-/commit/1615a2799384a2964d01ba77fe98e3f6fcc412f4

ARB currently bundles an older Eigen (eigen-2.0.16) which predates those fixes.


Thanks,
Trupti.


Hi,

I tested the build failure on ppc64el and confirmed it is caused by the outdated Eigen version(2.0.16) bundled in ARB.

Replacing the bundled Eigen with Eigen 3.4.0 resolves the issue.The updated version already includes endian-safe Altivec intrinsics that compile correctly on ppc64el.

I tested a fix by updating the bundled Eigen to version 3.4.0 and adjusting one source file (`RNACMA/Cma.cxx`) for Eigen3 API compatibility. The package now resolves the issue of Altivec code on ppc64el.

A proposed patch is attached for review.

Changes summary:
  • Update HEADERLIBS/Makefile to unpack Eigen 3.4.0.
  • Add HEADERLIBS/eigen to CC_INCLUDES in Makefile.
  • Update RNACMA/Cma.cxx to match Eigen 3 API.


Please review and consider applying this patch.






Note :
After resolving this issue also arb pacakge is FTBFS on ppc64el with different errors. Which will be taken care by bug number (#1114476).

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114476 bug report.


Thanks,
Trupti.
Description: Update bundled Eigen to version 3.4.0 for ppc64el Altivec fix
 The previous bundled Eigen version was too old and used deprecated
 Altivec intrinsics (vec_lvsl, vec_lvsr, etc.), which fail to compile
 on little-endian PowerPC (ppc64el) with GCC 14+.
 Upstream Eigen resolved these issues in later releases (>= 3.3.9)
 by replacing those intrinsics with endian-agnostic ones (vec_xl, vec_xst).
 
 This patch updates the bundled Eigen tarball extraction logic to use
 Eigen 3.4.0 and adjusts one source file (Cma.cxx) to match the updated
 Eigen API (requires `.toDenseMatrix()` on diagonal expressions).
 
 This fixes FTBFS on ppc64el while remaining compatible with other architectures.
Author: Étienne Mollier <[email protected]>
Bug-Debian: https://bugs.debian.org/1078136

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2025-11-13

--- arb-6.0.6.orig/HEADERLIBS/Makefile
+++ arb-6.0.6/HEADERLIBS/Makefile
@@ -4,10 +4,11 @@ all: eigen
 clean:
 	rm -rf eigen/
 
-EIGEN_PATCH=eigen_fix_gcc_610_compile.patch
-
-eigen: eigen.tgz $(EIGEN_PATCH) Makefile
-	tar -zxvf $<
-	patch -p0 < $(EIGEN_PATCH)
+# Unpack newer Eigen 3.4.0 instead of old tarball
+eigen: eigen.tgz Makefile
+	@echo "Unpacking Eigen3...."
+	tar -xzf eigen.tgz
+	mv eigen-* eigen
+	@echo "Using bundled Eigen 3 from HEADERLIBS/eigen"
 	touch eigen/
 
--- arb-6.0.6.orig/Makefile
+++ arb-6.0.6/Makefile
@@ -580,7 +580,7 @@ LIBPATH = -L$(ARBHOME)/lib
 DEST_LIB = lib
 DEST_BIN = bin
 
-CC_INCLUDES  := -I. -I$(ARBHOME)/INCLUDE $(XINCLUDES) $(ARB_GLIB_INCLUDE)
+CC_INCLUDES  := -I$(ARBHOME)/HEADERLIBS/eigen -I. -I$(ARBHOME)/INCLUDE $(XINCLUDES) $(ARB_GLIB_INCLUDE)
 CXX_INCLUDES := $(CC_INCLUDES)
 MAKEDEPENDFLAGS := -- -DARB_OPENGL -DUNIT_TESTS -D__cplusplus -I. -Y$(ARBHOME)/INCLUDE
 
--- arb-6.0.6.orig/RNACMA/Cma.cxx
+++ arb-6.0.6/RNACMA/Cma.cxx
@@ -93,7 +93,7 @@ MatrixXd Cma::computeMutualInformation(V
 
     JointEntropy = computeJointEntropy(seq);
 
-    JointEntropy = JointEntropy + JointEntropy.adjoint() - JointEntropy.diagonal().asDiagonal();
+    JointEntropy = (JointEntropy + JointEntropy.adjoint() - JointEntropy.diagonal().asDiagonal().toDenseMatrix()).eval();
 
     entropy = JointEntropy.diagonal();
 

Reply via email to