Non-deterministic failure of ARMv7 CI job
The ARMv7 CI job seems to be failing non-deterministically during configure
. For instance, see https://gitlab.haskell.org/ghc/ghc/-/jobs/353311.
I have managed to reproduce the issue. The difference seems to stem from whether configure
chooses to use ld.lld
as the linker, which seems to be oddly non-deterministic.
Passing case
For instance, when things are passing we get:
checking for -ld.lld... no
checking for ld.lld... ld.lld
checking whether C compiler supports -fuse-ld=lld... no
configure: unable to convince 'cc' to use linker 'ld.lld'
checking for -ld.gold... no
checking for ld.gold... ld.gold
checking whether C compiler supports -fuse-ld=gold... yes
checking for -readelf... no
checking for readelf... readelf
checking for -as... no
checking for as... as
checking for ld bug 16177... unaffected
checking whether ld is GNU ld... YES
checking whether ld understands --build-id... yes
checking whether ld understands -no_compact_unwind... yes
checking whether ld understands -filelist... no
checking for -nm... no
Failing case
However, when things fail we instead get:
checking for -ld.lld... no
checking for ld.lld... ld.lld
checking whether C compiler supports -fuse-ld=lld... yes
checking for -readelf... no
checking for readelf... readelf
checking for -as... no
checking for as... as
checking for ld bug 16177... ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected
unaffected
checking whether ld is GNU ld... YES
checking whether ld understands --build-id... yes
checking whether ld understands -no_compact_unwind... no
checking whether ld understands -filelist... no
checking for -nm... no
and later we get:
checking for char... yes
checking alignment of char... configure: error: cannot compute alignment (char)
See `config.log' for more details.
./configure --enable-tarballs-autodownload GHC=/usr/local/bin/ghc HAPPY=/home/ghc/.cabal/bin/happy ALEX=/home/ghc/.cabal/bin/alex faile
The output in config.log
is:
configure:12135: checking alignment of char
configure:12141: cc -o conftest -g -O2 -fuse-ld=lld -marm -Wl,-z,noexecstack conftest.c >&5
collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped
compilation terminated.
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
configure:12141: $? = 1
configure: program exited with status 1
configure: failed program was:
...