Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

realgcc.exe unable to start correctly #3189

Closed
tsoernes opened this issue May 26, 2017 · 4 comments
Closed

realgcc.exe unable to start correctly #3189

tsoernes opened this issue May 26, 2017 · 4 comments

Comments

@tsoernes
Copy link

tsoernes commented May 26, 2017

Trying to install some packages outside of a project. Using (global) resolver LTS-8.15.
I'm getting this:

stack install ghc-mod hlint stylish-haskell
extra-1.5.2: configure
base-compat-0.9.3: configure
cabal-doctest-1.0.2: configure
cmdargs-0.10.17: configure
Progress: 4/69
--  While building package cmdargs-0.10.17 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe --builddir=.stack-work\dist\ca59d0ab configure --with-ghc=C:\Users\Torstein\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin\ghc.EXE --with-ghc-pkg=C:\Users\Torstein\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin\ghc-pkg.EXE --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\141c7015\pkgdb --libdir=C:\sr\snapshots\141c7015\lib --bindir=C:\sr\snapshots\141c7015\bin --datadir=C:\sr\snapshots\141c7015\share --libexecdir=C:\sr\snapshots\141c7015\libexec --sysconfdir=C:\sr\snapshots\141c7015\etc --docdir=C:\sr\snapshots\141c7015\doc\cmdargs-0.10.17 --htmldir=C:\sr\snapshots\141c7015\doc\cmdargs-0.10.17 --haddockdir=C:\sr\snapshots\141c7015\doc\cmdargs-0.10.17 --dependency=base=base-4.9.1.0 --dependency=filepath=filepath-1.4.1.1 --dependency=process=process-1.4.3.0 --dependency=template-haskell=template-haskell-2.11.1.0 --dependency=transformers=transformers-0.5.2.0 --extra-include-dirs=C:\Users\Torstein\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\Users\Torstein\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\sr\global-project\.stack-work\logs\cmdargs-0.10.17.log

    Configuring cmdargs-0.10.17...
    `gcc.exe' failed in phase `C Compiler'. (Exit code: -1073741502)

With popups saying this:

---------------------------
realgcc.exe - Application Error
---------------------------
The application was unable to start correctly (0xc0000142). Click OK to close the application. 
---------------------------
OK   
---------------------------

Stack version

stack --version
Version 1.4.0, Git revision e714f1dd3fade19496d91bd6a017e435a96a6bcd x86_64 hpack-0.17.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository

Windows 10 x64

C:\Users\Torstein>where realgcc
C:\Users\Torstein\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.1\mingw\bin\realgcc.exe
C:\Users\Torstein>where gcc
C:\Users\Torstein\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.1\mingw\bin\gcc.exe

There's also a realgcc.exe in the ghc-8.0.2 folder, though it looks to be identical.

@random-j-farmer
Copy link

random-j-farmer commented May 27, 2017

I get this very same error (=Exit code: -1073741502) today in every stack project I tried, after letting Windows 10 install a "functional update". I don't see any popups though.

Was able to compile yesterday. I blame Microsoft.

Update: From #2998

Replacing gcc.exe with the fixed one from https://github.com/Mistuke/ghc-compat works for for me.

@mgsloan mgsloan added this to the Support milestone Jun 11, 2017
@KyleOndy
Copy link

I can confirm @random-j-farmer's fix worked for me.

@nh2
Copy link
Collaborator

nh2 commented Apr 28, 2018

Possibly related: #3988 (comment)

@mpilgrem
Copy link
Member

I am closing this issue given the passage of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants