handrian based build fails on ppc64le linux due to misconfiguration of stage0 ghc.
Summary
When attempting to build HEAD (as of today) on PPC64le linux platform (Ubuntu 18.04 LTS) the build fails with:
| Run Ghc CompileHs Stage1: rts/Updates.cmm => _build/stage1/rts/build/cmm/Updates.dyn_o
<no location info>: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM 7.0
<no location info>: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM 7.0
ghc: panic! (the 'impossible' happened)
(GHC version 8.9.20190402 for powerpc64le-unknown-linux):
LlvmCodeGen.Reg: GlobalReg (VanillaReg 10 VGcPtr) not supported!
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Error when running Shake build system:
at action, called at src/Rules.hs:68:19 in main:Rules
at need, called at src/Rules.hs:85:5 in main:Rules
* Depends on: _build/stage1/bin/ghc-pkg
at need, called at src/Utilities.hs:71:18 in main:Utilities
* Depends on: _build/stage1/rts/build/libHSrts-1.0-ghc8.9.20190402.so
at need, called at src/Rules/Library.hs:121:5 in main:Rules.Library
* Depends on: _build/stage1/rts/build/cmm/Updates.dyn_o
* Raised the exception:
user error (Development.Shake.cmd, system command failed
Command line: _build/stage0/bin/ghc -Wall -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -hide-all-packages -no-user-package-db '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id rts-1.0' -i -i_build/stage1/rts/build -i_build/stage1/rts/build/autogen -irts/. -Iincludes -I_build/generated -I_build/stage1/rts/build -I_build/stage1/rts/build/build -I_build/stage1/rts/build/../includes -I_build/stage1/rts/build/includes -I_build/stage1/rts/build/includes/dist-derivedconstants/header -Irts/build -Irts/../includes -Irts/includes -Irts/includes/dist-derivedconstants/header -I_build/generated -optc-I_build/generated -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=_build/generated/ghcversion.h -outputdir _build/stage1/rts/build -Wnoncanonical-monad-instances -optc-Werror=unused-but-set-variable -optc-Wno-error=inline -c rts/Updates.cmm -o _build/stage1/rts/build/cmm/Updates.dyn_o -O2 -H32m -this-unit-id rts -XHaskell98 -ghcversion-file=/tmpram/ghc/_build/generated/ghcversion.h -Irts -Wno-deprecated-flags -Wcpp-undef
Exit code: 1
Stderr:
<no location info>: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM 7.0
<no location info>: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM 7.0
ghc: panic! (the 'impossible' happened)
(GHC version 8.9.20190402 for powerpc64le-unknown-linux):
LlvmCodeGen.Reg: GlobalReg (VanillaReg 10 VGcPtr) not supported!
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
)
karel@power:/tmpram/ghc$
It looks like stage0 ghc seems to be configured with LLVM although there is no LLVM installed on the testing machine:
$ ./_build/stage0/bin/ghc --info|grep LLVM
,("LLVM llc command","llc")
,("LLVM opt command","opt")
,("LLVM clang command","clang")
this looks to me as misconfiguration of stage0 ghc. Of course make based build runs fine.
Steps to reproduce
./hadrian/build.cabal.sh
on Ubuntu 18.04 without installed LLVM on PPC64le host.
Expected behavior
What do you expect the reproducer described above to do?
Environment
- GHC version used: 8.6.3
Optional:
- Operating System: Ubuntu 18.04 LTS
- System Architecture: PPC64le