Bug#1112274: trilinos: FTBFS on arm64: collect2: fatal error: ld terminated with signal 6 [Aborted]
Adrian Bunk
bunk at debian.org
Fri Nov 21 15:02:45 GMT 2025
On Fri, Sep 05, 2025 at 05:42:31PM +0200, Emanuele Rocca wrote:
> Hi,
>
> On 2025-09-05 11:58, Adrian Bunk wrote:
> > +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 ppc64el riscv64 s390x sparc64))
> > + MOLD=-DCMAKE_CXX_FLAGS="-fuse-ld=mold"
> > +endif
>
> This unsets all CXXFLAGS!
Ouch, thanks for spotting.
> One could keep the flags with -DCMAKE_CXX_FLAGS="${CXXFLAGS} -fuse-ld=mold",
> but it seems cleaner to just set the following, without passing
> -DCMAKE_CXX_FLAGS at all.
>
> DEB_CXXFLAGS_MAINT_APPEND='-fuse-ld=mold'
Updated patch below.
This got the build time on riscv64 down from 1 week to 1 day with GCC 14
(both are higher with GCC 15 for unrelated reasons).
cu
Adrian
diff -Nru trilinos-16.1.0/debian/control trilinos-16.1.0/debian/control
--- trilinos-16.1.0/debian/control 2025-08-28 11:44:10.000000000 +0300
+++ trilinos-16.1.0/debian/control 2025-08-28 11:45:06.000000000 +0300
@@ -19,6 +19,7 @@
liblapack-dev,
libmumps-dev (>= 4.10),
libptscotch-dev (>= 6.0.3),
+ mold [amd64 ppc64el riscv64 s390x sparc64],
openmpi-bin,
zlib1g-dev
Build-Depends-Indep: bc,
diff -Nru trilinos-16.1.0/debian/rules trilinos-16.1.0/debian/rules
--- trilinos-16.1.0/debian/rules 2025-08-28 11:44:30.000000000 +0300
+++ trilinos-16.1.0/debian/rules 2025-08-28 11:45:06.000000000 +0300
@@ -75,6 +75,11 @@
override_dh_auto_configure: configure-stamp
+# mold is much faster but doesn't work everywhere, see #1112274
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 ppc64el riscv64 s390x sparc64))
+ export DEB_CXXFLAGS_MAINT_APPEND+=-fuse-ld=mold
+endif
+
# The below configuration selectively enables packages instead of first
# enabling all via
# ```
More information about the debian-science-maintainers
mailing list