Skip to content

The 'impossible' happened on a fresh installation on Windows 11

Summary

Write a brief description of the issue.

Steps to reproduce

  1. Buy a Lenovo laptop with Windows 11
  2. Configure Windows with Spanish keyboard and language, and install all automatic system updates. Restart afterwards.
  3. Go to haskell.org, click on download, click on GHCup (recommended) and copy the long instruction.
  4. Paste the long instruction in a powershell terminal. When asked, do not install stack or lhs, and accept all other default recommendations. Restart.
  5. Install VScode, install GIT, clone a repo with a simple Haskell app that should work
  6. run cabal repl in the same directory as the .cabal file:
Build profile: -w ghc-9.2.7 -O1
In order, the following will be built (use -v for more details):
 - svg-1.0.0.0 (lib) (first run)
Configuring library for svg-1.0.0.0..
Preprocessing library for svg-1.0.0.0..
GHCi, version 9.2.7: https://www.haskell.org/ghc/  :? for help
ghc-9.2.7.exe: Could not load `libstdc++-6.dll'. Reason: addDLL: libstdc++-6.dll or dependencies not loaded. (Win32 error 126)

ghc-9.2.7.exe: panic! (the 'impossible' happened)
  (GHC version 9.2.7:
        loadArchive "C:\\ghcup\\ghc\\9.2.7\\mingw\\lib\\gcc\\x86_64-w64-mingw32\\10.2.0\\libstdc++.dll.a": failed

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

cabal-3.6.2.0.exe: repl failed for svg-1.0.0.0.

Expected behavior

I expected everything to work correctly as it did on my old laptop.

  1. cabal build now creates a file called Main.exe which I do not dare to doubleclick. This is not my expected behaviour.
  2. cabal exec svg-exe does nothing (instantly jumps to new terminal line with no output, there is a putStrLn in the main function which is being ignored)
  3. cabal repl prints the error above.

Environment

  • GHC version used: 9.2.7
  • CABAL version used: 3.6.2.0

Optional:

  • Operating System: Windows 11
  • System Architecture: Lenovo
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information