Skip to content

Failure to install ghc from bindist #1298

@alt-romes

Description

@alt-romes

Initially reported by a user here: https://discourse.haskell.org/t/ghc-9-12-3-rc3-is-now-available/13391/4

The user attempted to install 9.12.3-rc2 using:

ghcup install ghc-9.12.3-rc3 --url https://downloads.haskell.org/ghc/9.12.3-rc3/ghc-9.12.2.20251209-aarch64-apple-darwin.tar.gz

Which failed with

[ Info  ] Unpacking: ghc-9.12.2.20251209-aarch64-apple-darwin.tar.gz to /Users/vanessa/.ghcup/tmp/ghcup-959bbdefb415be95
[ Info  ] Installing GHC (this may take a while)
[ ghc-configure ] checking build system type… aarch64-apple-darwin2…
[ ghc-configure ] checking host system type… aarch64-apple-darwin24…
[ ghc-configure ] checking target system type… Invalid configuratio…
[ ghc-configure ] configure: error: /bin/sh ./config.sub ghc failed

[ Error ] [GHCup-00841] Process “sh” with arguments [“./configure”,
[ …   ]                              “–prefix=/Users/vanessa/.ghcup/ghc/ghc-9.12.3-rc3”,
[ …   ]                              “–target=ghc”, “–disable-ld-override”] failed with exit code 1.
[ Error ] Also check the logs in /Users/vanessa/.ghcup/logs

> cat ~/.ghcup/logs/ghc-configure.log
checking build system type… aarch64-apple-darwin24.6.0
checking host system type… aarch64-apple-darwin24.6.0
checking target system type… Invalid configuration ‘ghc’: machine ‘ghc-unknown’ not recognized
configure: error: /bin/sh ./config.sub ghc failed

I was able to reproduce this error on a clean VM with only ghcup installed. This also failed when trying to install ghc-9.12.3-rc2.

On that same VM, I then tried to install from the bindist manually, using:

curl -LO https://downloads.haskell.org/ghc/9.12.3-rc3/ghc-9.12.2.20251209-aarch64-apple-darwin.tar.gz
tar xzf ghc-9.12.2.20251209-aarch64-apple-darwin.tar.gz
cd ghc-9.12.2.20251209-aarch64-apple-darwin
./configure --prefix=$(pwd)/here
make install
./here/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.12.2.20251209

And that succeeded without trouble.

I suspect the installation failure may be a bug with the way GHCup configures the bindist, hence this ticket.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions