I downloaded and installed stack using the installer on Windows.
I then try to run:
$ stack new new-project rio
$ cd new-project
$ stack run
This leads to this error:
WARNING: Ignoring mintty's bounds on Win32 (>=2.13.1); using Win32-2.6.2.1.
Reason: trusting snapshot over cabal file dependency information.
Linking C:\\sr\\setup-exe-cache\\x86_64-windows\\tmp-Cabal-simple_Z6RU0evB_3.2.1.0_ghc-8.10.7.exe ...
C://Users//Patrick//AppData//Local//Programs//stack//x86_64-windows//ghc-8.10.7//mingw//bin/ld.exe: C:\\sr\setup-exe-src\setup-Z6RU0evB.o:fake:(.text+0x232): undefined reference to `Cabalzm3zi0zi1zi0_DistributionziSimple_defaultMain_closure'
C://Users//Patrick//AppData//Local//Programs//stack//x86_64-windows//ghc-8.10.7//mingw//bin/ld.exe: C:\\sr\setup-exe-src\setup-Z6RU0evB.o:fake:(.data+0x178): undefined reference to `Cabalzm3zi0zi1zi0_DistributionziSimple_defaultMain_closure'
collect2.exe: error: ld returned 1 exit status
`gcc.exe' failed in phase `Linker'. (Exit code: 1)
-- While building simple Setup.hs (scroll up to its section to see the error) using:
C:\Users\Patrick\AppData\Local\Programs\stack\x86_64-windows\ghc-8.10.7\bin\ghc-8.10.7.exe -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-3.2.1.0 C:\sr\setup-exe-src\setup-Z6RU0evB.hs C:\sr\setup-exe-src\setup-shim-Z6RU0evB.hs -o C:\sr\setup-exe-cache\x86_64-windows\tmp-Cabal-simple_Z6RU0evB_3.2.1.0_ghc-8.10.7.exe
How can I resolve it? I am not even sure how to better understand the actual problem.
I am working with git bash.
I resolved the WARNING
by editing stack.yaml. I have also tried installing pkg-config
using pacman
on mingw
as in this answer but the package was not found.