Build process fails in object compiler/stage1/build/CmmParse.o in arm64v8
Summary
Build process fails in object compiler/stage1/build/CmmParse.o
compiler/stage1/build/CmmParse.hs:477:24: error:
Not in scope: `Prelude.*'
No module named `Prelude' is imported.
|
477 | bit_start = st Prelude.* 134
| ^^^^^^^^^
Steps to reproduce
Use docker with qemu for arm64v8 development in a amd64 linux and try to build ghc 8.10.2
docker run -it arm64v8/ubuntu:focal /bin/bash
export TARGETARCH=arm64 DEBIAN_FRONTEND="noninteractive" CABAL_VERSION=3.2.0.0 GHC_VERSION=8.10.2 JOBS="-j1"
sed -i -e "s/^\# deb-src/deb-src/g" /etc/apt/sources.list && apt-get -y update && apt-get -y upgrade && apt-get -y install --no-install-recommends apt-utils bash curl wget ca-certificates automake build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 libtool autoconf iproute2 miniupnpc cabal-install cabal-debian ghc llvm-9 llvm-9-dev python3 libgmp-dev libncurses-dev libgmp3-dev
cabal update && cabal install ${JOBS} cabal-install-${CABAL_VERSION} --constraint="lukko -ofd-locking" && dpkg --purge cabal-install
apt-get -y build-dep ghc && ~/.cabal/bin/cabal user-config update && ~/.cabal/bin/cabal v2-install ${JOBS} alex happy --constraint="lukko -ofd-locking" && git clone --recurse-submodules --tags https://gitlab.haskell.org/ghc/ghc.git /ghc && cd /ghc && git checkout ghc-${GHC_VERSION}-release && git submodule update --init && ./boot && ALEX=~/.cabal/bin/alex HAPPY=~/.cabal/bin/happy ./configure && PATH="~/.cabal/bin/:$PATH" make ${JOBS} install
Expected behavior
Finish the build, install ghc and be happy to develop in ghc 8.10.2 for ARM64
Environment
- GHC version used:
root@2ef6a080778b:/# ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
root@2ef6a080778b:/# uname -a
Linux 2ef6a080778b 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) aarch64 aarch64 aarch64 GNU/Linux
Optional:
- Operating System: ubuntu:focal
- System Architecture: arm64v8