Skip to content

Custom URL for the int-native version of GHC 9.12.2 is ignored when instaling through ghcup on Windows #1300

@oddron

Description

@oddron

Windows 11 24H2

The following command fails to install the int-native version of GHC 9.12.2:
ghcup install ghc -u "https://downloads.haskell.org/ghc/9.12.2/ghc-9.12.2-x86_64-unknown-mingw32-int_native.tar.xz" 9.12.2
After running this, I used ghcup tui to set version 9.12.2 as the default. I checked using ghc --version and ghc --info, and I found that ghcup ignored the url that I specified. It installed the GMP version of 9.12.2 instead.

Workaround:

  1. Manually download the int-native version ghc-9.12.2-x86_64-unknown-mingw32-int_native.tar.xz
  2. Run ghcup in offline mode, and specify a custom version name:
    ghcup --offline --no-guess-version install ghc -u "file:///C:/Users/Ronald/Downloads/ghc-9.12.2-x86_64-unknown-mingw32-int_native.tar.xz" int-native-9.12.2
  3. Use ghcup tui to set this version as the default.
    Note that the "S" flag does not appear in ghcup tui after setting this version as the default, but I checked using ghc --version and ghc --info to verify that the int-native version of 9.12.2 was successfully installed and set as the default.
Image
PS C:\Users\Ronald> ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.12.2
PS C:\Users\Ronald> ghc --info | Select-String -Pattern "C compiler flags"
 ,("C compiler flags","--target=x86_64-unknown-windows-gnu --rtlib=compiler-rt -D_UCRT
-IC:\\ghcup\\ghc\\int-native-9.12.2\\lib/../mingw//include -Qunused-arguments")

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