Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghcjs-boot fails with cabal: can't find source for GHC/Platform/Host #825

Open
minoki opened this issue Nov 20, 2021 · 0 comments
Open

ghcjs-boot fails with cabal: can't find source for GHC/Platform/Host #825

minoki opened this issue Nov 20, 2021 · 0 comments

Comments

@minoki
Copy link

minoki commented Nov 20, 2021

I'm trying to build ghcjs with the following Dockerfile:

FROM ubuntu:20.04
RUN apt-get update && apt-get install -y autoconf curl gcc git libgmp-dev libtinfo-dev make python3
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | env BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh
ENV PATH=/root/.cabal/bin:/root/.ghcup/bin:$PATH
RUN ghcup install ghc 8.10.7 --set && \
    ghcup install cabal 3.6.2.0 && \
    cabal v2-update && \
    cabal v2-install --constraint "happy==1.19.*" --overwrite-policy=always alex happy
WORKDIR /root
RUN git clone --depth 1 https://github.com/emscripten-core/emsdk.git
WORKDIR /root/emsdk
RUN ./emsdk install latest && ./emsdk activate latest
WORKDIR /root
RUN git clone --depth 1 --branch ghc-8.10 --recurse-submodules --shallow-submodules https://github.com/ghcjs/ghcjs.git
WORKDIR /root/ghcjs
RUN utils/makePackages.sh
RUN cabal v2-install --overwrite-policy=always --install-method=copy --installdir=inplace/bin --disable-documentation

# emsdk_env.sh doesn't work with plain shell
RUN bash -c 'source /root/emsdk/emsdk_env.sh && inplace/bin/ghcjs-boot --no-prof --no-haddock -s lib/boot'

...but the last stage (ghcjs-boot) fails with the following error:

...
Registering library for parsec-3.1.14.0..
installing package ghc-boot
configuring package: ghc-boot
/root/ghcjs/lib/boot/pkg/ghc-boot$ /root/.ghcup/bin/cabal "v1-configure" "--global" "--ghcjs" "--builddir" "dist" "--with-compiler" "/root/ghcjs/inplace/bin/ghcjs" "--with-hc-pkg" "/root/ghcjs/inplace/bin/ghcjs-pkg" "--with-haddock" "/root/ghcjs/inplace/bin/haddock" "--with-gcc" "/root/ghcjs/inplace/lib/bin/emcc" "--prefix" "/root/ghcjs/inplace" "--configure-option" "--host=js-unknown-ghcjs" "--ghcjs-options=-fwrite-ide-info" "--enable-debug-info" "--disable-library-stripping" "--disable-executable-stripping" "-fghci" "--disable-profiling" "--enable-shared"
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.6.2.0 supports
'ghc' version < 8.8): /root/ghcjs/inplace/bin/ghcjs is based on GHC version
8.10.7
Warning: ghc-boot.cabal:25:23: Packages with 'cabal-version: 1.12' or later
should specify a specific version of the Cabal spec of the form
'cabal-version: x.y'. Use 'cabal-version: 1.22'.
Resolving dependencies...
Warning: ghc-boot.cabal:25:23: Packages with 'cabal-version: 1.12' or later
should specify a specific version of the Cabal spec of the form
'cabal-version: x.y'. Use 'cabal-version: 1.22'.
Configuring ghc-boot-8.10.7...
/root/ghcjs/lib/boot/pkg/ghc-boot$ /root/.ghcup/bin/cabal "v1-build"
Warning: ghc-boot.cabal:25:23: Packages with 'cabal-version: 1.12' or later
should specify a specific version of the Cabal spec of the form
'cabal-version: x.y'. Use 'cabal-version: 1.22'.
Preprocessing library for ghc-boot-8.10.7..
cabal: can't find source for GHC/Platform/Host in ., dist/build/autogen,
dist/build/global-autogen

fatal: program /root/.ghcup/bin/cabal returned a nonzero exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant