{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiek4nepk45wblkttgml3cm72jkiifcfzdle4aqt7nekvmfwqefwja",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mjtoeboztqs2"
  },
  "path": "/t/problems-using-stack-in-a-msys2-shell/13939#post_4",
  "publishedAt": "2026-04-19T07:57:27.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "That was a replication with snapshot: lts-24.37\n\nReplicating 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\n\n\n    $  TEMP=/c/Users/drbean/AppData/Local/Temp TMP=/c/Users/drbean/AppData/Local/Temp stack build turtle-1.6.2\n\n    Warning: Ignoring tagged's bounds on template-haskell (>=2.11 && <2.24) and using template-haskell-2.24.0.0.\n             Reason: trusting snapshot over Cabal file dependency information.\n    StateVar                           > configure\n    assoc                              > configure\n    assoc                              > Configuring assoc-1.1.1...\n    StateVar                           > Configuring StateVar-1.2.2...\n    assoc                              > C:\\WINDOWS\\: openBinaryTempFileWithDefaultPermissions: permission denied (Permission denied)\n    StateVar                           > C:\\WINDOWS\\: openBinaryTempFileWithDefaultPermissions: permission denied (Permission denied)\n    Progress 2/51\n\n    Error: [S-7282]\n           Stack failed to execute the build plan.\n\n           While executing the build plan, Stack encountered the following errors:\n\n           [S-7011]\n           While building package StateVar-1.2.2 (scroll up to its section to see the error) using:\n           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\n    --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 -\n    -user --package-db=clear --package-db=global --package-db=C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473a\\pkgdb --libdir=C:\\U\n    sers\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473a\\lib --bindir=C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473a\\bin --datad\n    ir=C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473a\\share --libexecdir=C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473\n    a\\libexec --sysconfdir=C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473a\\etc --docdir=C:\\Users\\drbean\\AppData\\Roaming\\stack\\sna\n    pshots\\9d06473a\\doc\\StateVar-1.2.2 --htmldir=C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473a\\doc\\StateVar-1.2.2 --haddockdir=\n    C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\9d06473a\\doc\\StateVar-1.2.2 --dependency=base=base-4.22.0.0-fd17 --dependency=stm=stm-\n    2.5.3.1-5491 --dependency=transformers=transformers-0.6.1.2-f688 --extra-include-dirs=C:\\ghcup\\msys64\\ucrt64\\include --extra-include-d\n    irs=C:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2-20240727\\ucrt64\\include --extra-lib-dirs=C:\\ghcup\\msys64\\ucrt6\n    4\\lib --extra-lib-dirs=C:\\ghcup\\msys64\\ucrt64\\bin --extra-lib-dirs=C:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2\n    -20240727\\ucrt64\\lib --extra-lib-dirs=C:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2-20240727\\ucrt64\\bin --exact-\n    configuration --ghc-option=-fhide-source-paths\n           Process exited with code: ExitFailure 1\n\n\n\n\nwith a smilar error for assoc-1.1.1\n\nBut again with stack’s MSYS2 it succeeds in 51 steps, 9 more than the 42(?) with lts-24.27",
  "title": "Problems using Stack in a MSYS2 shell"
}