I've been trying to build my Haskell project for the last couple days using stack and I'm getting an access violation error. From what I understand I have the latest stack version and GHC.
This was all originally working until I added a library to my cabal file. I've now removed it but the error still occurs. I've also reverted back to when my code was definitely working so I'm sure this is something caused by stack.
I've tried uninstalling stack, deleting .stack-work and reinstalling. Then doing a stack setup. I've tried many variations of commands but no results.
I've now also tried creating a new project with Stack and building it and I get the same issue.
stack build
Building all executables for `haskell-project' once. After a successful build of all of them, only specified executables will be rebuilt.
haskell-project-0.1.0.0: configure (exe)
Access violation in generated code when reading 000000000e58391a
-- While building custom Setup.hs for package haskell-project-0.1.0.0 using:
C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.1.0_ghc-8.2.2.exe --builddir=.stack-work\dist\5c8418a7 configure --with-ghc=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.2\bin\ghc.EXE --with-ghc-pkg=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.2\bin\ghc-pkg.EXE --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\13cecb13\pkgdb --package-db=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\pkgdb --libdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\lib --bindir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\bin --datadir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\share --libexecdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\libexec --sysconfdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\etc --docdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\doc\haskell-project-0.1.0.0 --htmldir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\doc\haskell-project-0.1.0.0 --haddockdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\doc\haskell-project-0.1.0.0 --dependency=base=base-4.10.1.0 --dependency=containers=containers-0.5.10.2 --dependency=mtl=mtl-2.2.1-DscMMmDQUE6GBfOSl4qMUH --dependency=parsec=parsec-3.1.11-3BgBURmbRiVF8fgoxhAiBa --dependency=pretty-simple=pretty-simple-2.0.1.0-J3QTM6x6LHL5fhqavYvVhJ --dependency=text=text-1.2.2.2-9VTsh6V7U7hpagw2HDvpZ --extra-include-dirs=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin --extra-lib-dirs=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib --enable-tests --enable-benchmarks
Process exited with code: ExitFailure 1
What would be the steps to fix this or likely causes?