[Bug 264192] lang/ghc: poudriere based build used odd mix of devel/llvm10 and system toolchain

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 23 Aug 2022 10:50:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264192

--- Comment #34 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
[A similar submittal of again having the wrong
mix of llc versions in use may need to be submitted.]

For ghc-9.2.4 builds, should the early:

/wrkdirs/usr/ports/lang/ghc/work/ghc-8.10.7-boot/lib/ghc-8.10.7/bin/ghc . . .

related command activity be using:

/usr/local/llvm12/bin/llc . . .

commands? Or should it be using:

/usr/local/llvm10/bin/llc . . .

commands?

What I see is only /usr/local/llvm12/bin/llc
based despite the Makefile file listing
BOOT_LLVM_VERSION as 10:

LLVM_VERSION?=          12
BOOT_GHC_VERSION=       8.10.7
# LLVM version that bootstrap compiler uses
BOOT_LLVM_VERSION=      10

I ask because the existing builds on the servers for armv7 again
look like they did for when this was submitted, where an incorrect
mix of llc versions had been in use. The failure is now before the
haddock issues again, as well. (The below is from my personal test
build so I would watch the build commands, instead of being from
the FreeBSD build servers.)

LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: /usr/local/llvm12/bin/llc -O1 -enable-tbaa
-relocation-model=static -mcpu=generic -mattr=+strict-align
/tmp/ghc24288_0/ghc_6.bc -o /tmp/ghc24288_0/ghc_7.lm_s
1.      Running pass 'Function Pass Manager' on module
'/tmp/ghc24288_0/ghc_6.bc'.
2.      Running pass 'ARM Instruction Selection' on function
'@"s17Rl_info$def"'
LLVM ERROR: out of memory
Allocation failed
  HC [stage 1]
libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/PreProcess.o
`llc12' failed in phase `LLVM Compiler'. (Exit code: -6)
gmake[2]: *** [compiler/ghc.mk:288: compiler/stage2/build/GHC/Hs/Instances.p_o]
Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [Makefile:128: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/ghc/work/ghc-9.2.4'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

If:

/wrkdirs/usr/ports/lang/ghc/work/ghc-8.10.7-boot/lib/ghc-8.10.7/bin/ghc . . .

should use:

/usr/local/llvm10/bin/llc . . .

then a new problem looks like it would need submittal and fixing.


For reference, the recent

http://ampere2.nyi.freebsd.org/data/main-armv7-default/p85ef7d020401_s0fd8d3589/logs/errors/ghc-9.2.4.log

lists:

LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: /usr/local/llvm12/bin/llc -O1 -enable-tbaa
-relocation-model=static -mcpu=generic -mattr=+strict-align
/tmp/ghc22379_0/ghc_6.bc -o /tmp/ghc22379_0/ghc_7.lm_s
1.      Running pass 'Function Pass Manager' on module
'/tmp/ghc22379_0/ghc_6.bc'.
2.      Running pass 'ARM Instruction Selection' on function
'@"s17Rl_info$def"'
  HC [stage 1] compiler/stage2/build/GHC/StgToCmm/Monad.p_o
`llc12' failed in phase `LLVM Compiler'. (Exit code: -6)
gmake[2]: *** [compiler/ghc.mk:288: compiler/stage2/build/GHC/Hs/Instances.p_o]
Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [Makefile:128: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/ghc/work/ghc-9.2.4'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.