External Publication
Visit Post

Problems using Stack in a MSYS2 shell

Haskell Community [Unofficial] April 19, 2026
Source

That was a replication with snapshot: lts-24.37

Replicating the second build against ghc-9.14.1, with ghcup’s stack and MSYS2 at C:\msys64 and $TMP pointing either at C:\msys\tmp or the windows user tmp dir, C:\Users\drbean\AppData\Local\Temp, it fails with

$  TEMP=/c/Users/drbean/AppData/Local/Temp TMP=/c/Users/drbean/AppData/Local/Temp stack build turtle-1.6.2

Warning: Ignoring tagged's bounds on template-haskell (>=2.11 && <2.24) and using template-haskell-2.24.0.0.
         Reason: trusting snapshot over Cabal file dependency information.
StateVar                           > configure
assoc                              > configure
assoc                              > Configuring assoc-1.1.1...
StateVar                           > Configuring StateVar-1.2.2...
assoc                              > C:\WINDOWS\: openBinaryTempFileWithDefaultPermissions: permission denied (Permission denied)
StateVar                           > C:\WINDOWS\: openBinaryTempFileWithDefaultPermissions: permission denied (Permission denied)
Progress 2/51

Error: [S-7282]
       Stack failed to execute the build plan.

       While executing the build plan, Stack encountered the following errors:

       [S-7011]
       While building package StateVar-1.2.2 (scroll up to its section to see the error) using:
       C:\Users\drbean\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_O_vy6YIf_3.16.0.0_ghc-9.14.1.exe --verbose=1
--builddir=.stack-work\dist\505eed1c configure --with-ghc=C:\ghcup\bin\ghc-9.14.1.exe --with-ghc-pkg=C:\ghcup\bin\ghc-pkg-9.14.1.exe -
-user --package-db=clear --package-db=global --package-db=C:\Users\drbean\AppData\Roaming\stack\snapshots\9d06473a\pkgdb --libdir=C:\U
sers\drbean\AppData\Roaming\stack\snapshots\9d06473a\lib --bindir=C:\Users\drbean\AppData\Roaming\stack\snapshots\9d06473a\bin --datad
ir=C:\Users\drbean\AppData\Roaming\stack\snapshots\9d06473a\share --libexecdir=C:\Users\drbean\AppData\Roaming\stack\snapshots\9d06473
a\libexec --sysconfdir=C:\Users\drbean\AppData\Roaming\stack\snapshots\9d06473a\etc --docdir=C:\Users\drbean\AppData\Roaming\stack\sna
pshots\9d06473a\doc\StateVar-1.2.2 --htmldir=C:\Users\drbean\AppData\Roaming\stack\snapshots\9d06473a\doc\StateVar-1.2.2 --haddockdir=
C:\Users\drbean\AppData\Roaming\stack\snapshots\9d06473a\doc\StateVar-1.2.2 --dependency=base=base-4.22.0.0-fd17 --dependency=stm=stm-
2.5.3.1-5491 --dependency=transformers=transformers-0.6.1.2-f688 --extra-include-dirs=C:\ghcup\msys64\ucrt64\include --extra-include-d
irs=C:\Users\drbean\AppData\Roaming\stack\programs\x86_64-windows\msys2-20240727\ucrt64\include --extra-lib-dirs=C:\ghcup\msys64\ucrt6
4\lib --extra-lib-dirs=C:\ghcup\msys64\ucrt64\bin --extra-lib-dirs=C:\Users\drbean\AppData\Roaming\stack\programs\x86_64-windows\msys2
-20240727\ucrt64\lib --extra-lib-dirs=C:\Users\drbean\AppData\Roaming\stack\programs\x86_64-windows\msys2-20240727\ucrt64\bin --exact-
configuration --ghc-option=-fhide-source-paths
       Process exited with code: ExitFailure 1

with a smilar error for assoc-1.1.1

But again with stack’s MSYS2 it succeeds in 51 steps, 9 more than the 42(?) with lts-24.27

Discussion in the ATmosphere

Loading comments...