Skip to content

stack setup 7.8.4 fails sanity check on Windows #3213

@ygale

Description

@ygale

General summary/comments (optional)

stack setup 7.8.4 on Windows fails with the following error message (sanitized by replacing the actual AppData path with %AppData%):

The GHC located at %AppData%\Local\Programs\stack\x86_64-windows\ghc-7.8.4\bin\ghc.EXE failed to compile a sanity check. Please see:

    http://docs.haskellstack.org/en/stable/install_and_upgrade/

for more information. Exception was:
Running %AppData%\Local\Programs\stack\x86_64-windows\ghc-7.8.4\bin\ghc.EXE %AppData%\Local\Temp\stack-sanity-check4848\Main.hs -no-user-package-db in directory %AppData%\Local\Temp\stack-sanity-check4848\ exited with ExitFailure 1

[1 of 1] Compiling Main             ( %AppData%\Local\Temp\stack-sanity-check4848\Main.hs, %AppData%\Local\Temp\stack-sanity-check4848\Main.o )


<no location info>:
    Warning: Couldn't figure out linker information!
             Make sure you're using GNU gcc, or clang
Unable to start %AppData%\Local\Programs\stack\x86_64-windows\ghc-7.8.4\mingw\bin/realgcc.exe (error code: 2

Workaround: Copy the file

%APPDATA%\Local\Programs\stack\x86_64-windows\ghc-7.8.4\mingw\bin\x86_64-w64-mingw32-gcc.exe

to realgcc.exe in the same folder.

Steps to reproduce

stack setup 7.8.4

Expected

Successful installation of GHC version 7.8.4.

Actual

The error message above. After performing the above workaround, GHC version 7.8.4 then works fine.

Stack version

Version 1.4.0, Git revision e714f1dd3fade19496d91bd6a017e435a96a6bcd x86_64 hpack-0.17.0

Method of installation

  • Official Windows 64-bit MSI, downloaded from stackage.org

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions