This repository was archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Haskell - ghcup not installing correctly #1692
Copy link
Copy link
Open
Description
Having problems using the Haskell community devcontainer. During the initial image build I'm getting the following error:
> [dev_container_auto_added_stage_label 5/5] RUN ghcup install ghc "recommended" --set && ghcup install cabal recommended --set && ghcup install stack recommended --set && ghcup install hls recommended --set && cabal update:
#0 5.512 [ Info ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml as file /home/vscode/.ghcup/cache/ghcup-0.0.7.yaml
#0 5.660 % Total % Received % Xferd Average Speed Time Time Time Current
#0 5.660 Dload Upload Total Spent Left Speed
100 191k 100 191k 0 0 600k 0 --:--:-- --:--:-- --:--:-- 602k
#0 6.263 [ Info ] downloading: https://downloads.haskell.org/~ghc/9.2.5/ghc-9.2.5-x86_64-deb10-linux.tar.xz as file /home/vscode/.ghcup/tmp/ghcup-d56701088496e67c/ghc-9.2.5-x86_64-deb10-linux.tar.xz
#0 6.362 % Total % Received % Xferd Average Speed Time Time Time Current
#0 6.362 Dload Upload Total Spent Left Speed
100 231M 100 231M 0 0 10.8M 0 0:00:21 0:00:21 --:--:-- 11.4M
#0 27.73 [ Info ] verifying digest of: ghc-9.2.5-x86_64-deb10-linux.tar.xz
#0 30.52 [ Info ] Unpacking: ghc-9.2.5-x86_64-deb10-linux.tar.xz to /home/vscode/.ghcup/tmp/ghcup-28fcb20a5ef12715
#0 106.2 [ Info ] Installing GHC (this may take a while)
#0 108.6
#0 108.6
#0 108.6
#0 108.6
#0 108.6
#0 111.6 [ Error ] Both installation and setting the tool failed. Install error was: Process "gmake" with arguments ["DESTDIR=/home/vscode/.ghcup/tmp/ghcup-625e9d3b6a1ae791",
#0 111.6 [ ... ] "install"] failed with exit code 2.
#0 111.6 [ ... ] Set error was: The version 9.2.5 of the tool ghc is not installed.
#0 111.6 [ Error ] Also check the logs in /home/vscode/.ghcup/logs
------
ERROR: failed to solve: executor failed running [/bin/sh -c ghcup install ghc "${GHC_VERSION}" --set && ghcup install cabal recommended --set && ghcup install stack recommended --set && ghcup install hls recommended --set && cabal update]: exit code: 3
[116203 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/7n/brvdl9m17dd2v2j6xk495z3c0000gq/T/devcontainercli/container-features/0.23.2-1668525230577/Dockerfile-with-features -t vsc-haskell-sandbox-23279f8617b97768867d4d6fa0727610 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /Users/piotrjustyna/Documents/code/haskell-sandbox/.devcontainer
[116203 ms] at doe (/Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js:1888:1635)
[116203 ms] at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[116203 ms] at async pF (/Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js:1887:1973)
[116203 ms] at async eT (/Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js:1887:901)
[116203 ms] at async voe (/Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js:1893:2049)
[116203 ms] at async Xf (/Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js:1893:3212)
[116203 ms] at async Jae (/Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js:2013:15058)
[116203 ms] at async Wae (/Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js:2013:14812)
[116205 ms] Exit code 1
[116207 ms] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/piotrjustyna/.vscode/extensions/ms-vscode-remote.remote-containers-0.262.3/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/piotrjustyna/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /Users/piotrjustyna/Documents/code/haskell-sandbox --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/piotrjustyna/Documents/code/haskell-sandbox --log-level debug --log-format json --config /Users/piotrjustyna/Documents/code/haskell-sandbox/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[116207 ms] Exit code 1
This command seems to be failing:
RUN ghcup install ghc "${GHC_VERSION}" --set \
&& ghcup install cabal recommended --set \
&& ghcup install stack recommended --set \
&& ghcup install hls recommended --set \
&& cabal update
Where "${GHC_VERSION}"
is "recommended"
. I tried experimenting with:
- removing the variable altogether
- replacing it with a concrete version gf ghc (e.g. 9)
but getting errors in all scenarios.
- VSCode Version: 1.73.1
- Local OS Version: macOS 12.6.1
- Local chip architecture: Apple Silicon
- Reproduces in: Remote - Containers (only tried remote containers)
- Name of Dev Container Definition with Issue: Haskell
Steps to Reproduce:
- open an empty directory in vscode
- cmd+shift+p -> add dev container configuration files -> Haskell community -> recommended -> Install ZSH -> no additional packages -> ok
Metadata
Metadata
Assignees
Labels
No labels