#1125102 deal.ii: FTBFS on arm64: collect2: fatal error: ld terminated with signal 6 [Aborted]

#1125102#5
Date:
2026-01-09 11:07:10 UTC
From:
To:
deal.ii has a very bad track record for building on arm64 [1]

I couldn't find a previous bug where help was requested from the arm
porters, so here goes:

when linking with ld.mold (as in 9.7.1-3~exp1) I see:

collect2: fatal error: ld terminated with signal 6 [Aborted]

when linking with ld.bfd (as in 9.7.1-2) the build times out, but I
have also seen:

relocation truncated to fit: R_AARCH64_CALL26 against symbol
`dealii::ExceptionBase::ExceptionBase()' defined in .text section in
base/CMakeFiles/object_base_debug.dir/exceptions.cc.o

To me, at least the first failure seems very similar to bug #1112274
in Trilinos [2].

Also, the loong64 porters proposed a patch in #1120656 [3] to 'Fix
relocation R_LARCH_B26 overflow on loong64'.

Any help would be appreciated.

Thanks in advance
Graham


[1] https://buildd.debian.org/status/logs.php?pkg=deal.ii&arch=arm64
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112274
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1120656

#1125102#10
Date:
2026-01-14 19:22:11 UTC
From:
To:
Hey Graham,

It seems that building without outline atomics is a possible workaround,
so on arm64 you could try:

export DEB_CXXFLAGS_MAINT_APPEND=-mno-outline-atomics

The build times out for me, with an ld process maxing out one core for a
long time, but at least I get no relocation failures!

#1125102#15
Date:
2026-01-15 10:00:08 UTC
From:
To:
Hi Emanuele

Thanks!

Which version did you try to build?

Version 9.7.1-3~exp1 in experimental should use the mold linker, and
might avoid the time out.

Regards
Graham

#1125102#20
Date:
2026-01-16 10:40:20 UTC
From:
To:
Ah yes I built the version in unstable (9.7.1-2).

9.7.1-3~exp1 fails with the same error as trilinos bug #1112274:

 /usr/lib/aarld.mold: ./src/thunks.cc:217: void mold::OutputSection<E>::create_range_extension_thunks(mold::Context<E>&) [with E = mold::ARM64LE]: Assertion `thunk.size() < max_thunk_size' failed.

I tried both with and without adding -ffunction-sections to LDFLAGS,
same error.

#1125102#25
Date:
2026-01-16 13:26:03 UTC
From:
To:
That's a pity.  Thanks for trying.

For what it's worth, deal.ii builds in Ubuntu on arm64 with the mold
linker but fails with ld.bfd.