Bug#1112274: trilinos: FTBFS on arm64: collect2: fatal error: ld terminated with signal 6 [Aborted]
Adrian Bunk
bunk at debian.org
Fri Sep 5 09:58:31 BST 2025
On Sat, Aug 30, 2025 at 11:19:42AM +0000, Graham Inggs wrote:
> Control: severity -1 important
>
> Hi
>
> I'm lowering the severity of this bug because I managed to work around
> it by disabling mold for now. However, it would be nice to use mold,
> as it speeds up the build by a factor of around three on amd64 [1],
> ppc64el [2] and s390x [3].
It also gives me a build time < 1 day on riscv64.
The patch below whitelists mold on the architectures where it works for
trilinos, which includes the architectures where speed matters most for
developers (amd64) and buildds (riscv64).
Ideally the issue with mold on arm64 should be debugged and fixed,
but that's not a particularly important issue for trilinos.
> Regards
> Graham
>...
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))
+ MOLD=-DCMAKE_CXX_FLAGS="-fuse-ld=mold"
+endif
+
# The below configuration selectively enables packages instead of first
# enabling all via
# ```
@@ -94,6 +99,8 @@
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
\
+ $(MOLD) \
+ \
-DTrilinos_LIBRARY_NAME_PREFIX:STRING="trilinos_" \
-DTrilinos_INSTALL_INCLUDE_DIR:PATH=include/trilinos/ \
-DTrilinos_INSTALL_TriBITS:BOOL=OFF \
More information about the debian-science-maintainers
mailing list