Skip to content

ghc-8.10.5 fails to build with llvm on s390x Linux

Summary

I am unable to get ghc-8.10.5 to build itself on Fedora Linux Rawhide (35 development) for s390x.

Steps to reproduce

Build ghc-8.10.5 against itself on Linux s390x:

:
chmod +x                                                     inplace/bin/ghc-stage2
"inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf  dyn_o -hcsuf dyn_hc -fPIC -dynamic  -H32m -O -Wall     -hide-all-packages -package-env - -i -iutils/check-api-annotations/. -iutils/check-api-annotations/dist-install/build -Iutils/check-api-annotations/dist-install/build -iutils/check-api-annotations/dist-install/build/check-api-annotations/autogen -Iutils/check-api-annotations/dist-install/build/check-api-annotations/autogen     -optP-include -optPutils/check-api-annotations/dist-install/build/check-api-annotations/autogen/cabal_macros.h -package-id Cabal-3.2.1.0 -package-id base-4.14.2.0 -package-id containers-0.6.4.1 -package-id directory-1.3.6.0 -package-id ghc-8.10.5 -Wall -XHaskell2010  -no-user-package-db -rtsopts      -Wnoncanonical-monad-instances  -outputdir utils/check-api-annotations/dist-install/build   -c utils/check-api-annotations/./Main.hs -o utils/check-api-annotations/dist-install/build/Main.dyn_o 
"inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf  dyn_o -hcsuf dyn_hc -fPIC -dynamic  -H32m -O -Wall     -hide-all-packages -package-env - -i -iutils/check-ppr/. -iutils/check-ppr/dist-install/build -Iutils/check-ppr/dist-install/build -iutils/check-ppr/dist-install/build/check-ppr/autogen -Iutils/check-ppr/dist-install/build/check-ppr/autogen     -optP-include -optPutils/check-ppr/dist-install/build/check-ppr/autogen/cabal_macros.h -package-id Cabal-3.2.1.0 -package-id base-4.14.2.0 -package-id bytestring-0.10.12.0 -package-id containers-0.6.4.1 -package-id directory-1.3.6.0 -package-id filepath-1.4.2.1 -package-id ghc-8.10.5 -Wall -XHaskell2010  -no-user-package-db -rtsopts      -Wnoncanonical-monad-instances  -outputdir utils/check-ppr/dist-install/build   -c utils/check-ppr/./Main.hs -o utils/check-ppr/dist-install/build/Main.dyn_o 
make[1]: *** [utils/check-ppr/ghc.mk:18: utils/check-ppr/dist-install/build/Main.dyn_o] Illegal instruction (core dumped)
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [utils/check-api-annotations/ghc.mk:18: utils/check-api-annotations/dist-install/build/Main.dyn_o] Illegal instruction (core dumped)
make: *** [Makefile:128: all] Error 2

For full log (for 2 weeks) and other details see https://koji.fedoraproject.org/koji/taskinfo?taskID=71830271.

The packaging is https://src.fedoraproject.org/rpms/ghc/blob/rawhide/f/ghc.spec

Expected behavior

To build successfully

Environment

  • GHC version used: 8.10.5

Optional:

  • Operating System: Linux
  • System Architecture: s390x

This affects s390x with llvm): other archs are fine (x86_64, i686, aarch64, armv7hl, ppc64le).

It builds fine against ghc-8.8.4 without llvm.

I haven't tried ghc-8.10.4 against ghc-8.10.4 yet.

cc @stefansf

Edited by Jens Petersen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information