ghc.exe: Could not load `libgcc_s_seh-1.dll'
Summary
Many packages fail to build or produce erroneous executables on Windows.
Steps to reproduce
On Windows:
- Install GHCup & GHC 8.10.7 & cabal-install 3.6.2.0
cabal unpack bytestring
cd .\bytestring-0.11.3.0\
cabal test
This produces the output:
...
[ 7 of 15] Compiling Lift ( tests\Lift.hs, C:\Users\Jaro\test\bytestring-0.11.3.0\dist-newstyle\build\x86_64-windows\ghc-8.10.7\bytestring-0.11.3.0\t\bytestring-tests\build\bytestring-tests\bytestring-tests-tmp\Lift.o )
ghc.exe: Could not load `libgcc_s_seh-1.dll'. Reason: addDLL: libgcc_s_seh-1.dll or dependencies not loaded. (Win32 error 126)
ghc.exe: panic! (the 'impossible' happened)
(GHC version 8.10.7:
loadArchive "C:\\ghcup\\ghc\\8.10.7\\mingw\\lib\\gcc\\x86_64-w64-mingw32\\9.2.0\\libgcc_s.a": failed
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Expected behavior
Compile successfully.
Environment
- GHC version used: 8.10.7
Optional:
- Operating System: Windows 10
- System Architecture: x86_64