# Problems using Stack in a MSYS2 shell

**URL:** <https://discourse.haskell.org/t/problems-using-stack-in-a-msys2-shell/13939>\
**Category:** Learn\
**Created:** [April 16, 2026, 7:45pm UTC](https://discourse.haskell.org/t/problems-using-stack-in-a-msys2-shell/13939 "2026-04-16T19:45:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [April 16, 2026, 7:59pm UTC](https://discourse.haskell.org/t/problems-using-stack-in-a-msys2-shell/13939/2 "2026-04-16T19:59:43Z")

</div>

So, why does my experience differ from yours? Perhaps the clue is in your message:

```plaintext
C:\ghcup\bin\ghc-9.14.1.exe ... -o C:\Users\drbean\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\
tmp-Cabal-simple_O_vy6YIf_3.16.0.0_ghc-9.14.1.exe

```

This is (a) using GHC 9.14.1 (for which there is no Stackage snapshot) and (b) a version of GHC supplied by GHCup. I don’t use, or need to use, GHCup to manage GHC versions on Windows - I use Stack to manage GHC versions directly.

If I try to build against GHC 9.14.1 (by specifying a GHC 9.12.4 snapshot and overriding the compiler version in that snapshot), I get:

```plaintext
$ /c/Users/mike/AppData/Roaming/local/bin/stack --snapshot nightly-2026-04-16 --compiler ghc-9.14.1 build turtle

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.

Error: [S-4804]
       Stack failed to construct a build plan.

       While constructing the build plan, Stack encountered the following errors. The 'Stack
       configuration' refers to the set of package versions specified by the snapshot (after any
       dropped packages, or pruned GHC boot packages; if a boot package is replaced, Stack prunes
       all other such packages that depend on it) and any extra-deps:

       In the dependencies for turtle-1.6.2:
         * containers must match >=0.5.0.0 && <0.8, but containers-0.8 is in the Stack configuration
           (latest matching version is 0.7).
         * optparse-applicative must match >=0.18 && <0.19, but optparse-applicative-0.19.0.0 is in
           the Stack configuration (latest matching version is 0.18.1.0).
         * time must match <1.15, but time-1.15 is in the Stack configuration (latest matching
           version is 1.14).
       The above is/are needed since turtle is a build target.

       Some different approaches to resolving some or all of this:

         * To ignore all version constraints and build anyway, pass --allow-newer, or, in
           D:\sr\config.yaml (global configuration), set allow-newer: true.

         * To ignore certain version constraints and build anyway, also add these package names
           under allow-newer-deps: turtle.

         * Recommended action: try adding the following to your extra-deps in
           D:\sr\global-project\stack.yaml (project-level configuration):

           - containers-0.7@sha256:e9b5fdcc609159410d408c47e0be13663bb0b4a42a5183b52aa0ac9c99e1dfec,2668
           - optparse-applicative-0.18.1.0@sha256:f30973861ac7e7ebff05ff8c7c3d1e4d283a1f3850e1cc14106b0693ec1b6d82,5289
           - time-1.14@sha256:918455e07f347049c2169a43169aca77de7a2c97e33aca0b476aabcd8a79798d,6989

```

So, I’ll need a more complex package version set in `stack.yaml` before `turtle-1.6.2` will build. I can build a local copy of `turtle` with GHC 9.14.1 in a MSYS2 shell with:

```plaintext
$ /c/Users/mike/AppData/Roaming/local/bin/stack unpack turtle
$ cd turtle-1.6.2
$ /c/Users/mike/AppData/Roaming/local/bin/stack build

```

and

```yaml
# stack.yaml
snapshot: nightly-2026-04-16
compiler: ghc-9.14.1

extra-deps:
- binary-0.8.9.3@sha256:8b03c7fd5a7f6803280fba87e38d534beb1dc92fec975de5bd36200633996ef2,6576
- containers-0.7@sha256:e9b5fdcc609159410d408c47e0be13663bb0b4a42a5183b52aa0ac9c99e1dfec,2668
- directory-1.3.10.1@sha256:bf029d8163ccae567cc6a5aa8f654016f58dfc066d15f8a8f7c74b8ca855562c,3174
- file-io-0.1.6@sha256:5e3466f15993e499db47d79d09c519d6d37c143cfe94fb46dd218bf2f6f3fd39,3550
- filepath-1.4.301.0@sha256:2c5d05f98759938db45757016ec406ed2c6021cd9018a53fedb76b9d5a8239ea,6128
- optparse-applicative-0.18.1.0@sha256:f30973861ac7e7ebff05ff8c7c3d1e4d283a1f3850e1cc14106b0693ec1b6d82,5289
- process-1.6.27.0@sha256:0512ed17e7e312a6412859abcb37a7bcc81b94cbb797a1ba2a8c78a5d3055d32,2947
- text-2.1.4@sha256:32823fd40b02db9b4ef4c527c9c3e6c1dcd365b8a79521f9d78d2c0a0a8d64f1,11602
- time-1.14@sha256:918455e07f347049c2169a43169aca77de7a2c97e33aca0b476aabcd8a79798d,6989
- Win32-2.14.2.1@sha256:7c68fc9d937c6e4c590472e9dd06d7e336338e01a5f2918ee9cf75c28871badd,5875

```

---

_[View the full topic](https://discourse.haskell.org/t/problems-using-stack-in-a-msys2-shell/13939)._
