{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiddmqteqkvrmr7e2lm2kumhw6blbt6bcfercbkmyxndjz5kfjwtfq",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mk2fadsvcbw2"
},
"path": "/t/problems-using-stack-in-a-msys2-shell/13939#post_7",
"publishedAt": "2026-04-22T00:31:15.000Z",
"site": "https://discourse.haskell.org",
"textContent": "On Sun, 19 Apr 2026, Mike Pilgrem wrote:\n\n> and in the Stack-supplied MSYS2 shell (extracts only):\n>\n>\n> $ env\n> ...\n> MSYSTEM=MSYS\n>\n\nI was running stack in a UCRT64 environment shell\n\nMSYSTEM=UCRT64\nMSYSTEM_PREFIX=/ucrt64\n\nI will try again in a plain MSYS one.\n\nGHCUP_MSYS2_ENV was the same, but I didn’t have\nGHCUP_MSYS2 or any STACK ones.\n\n>\n> $ cygpath -w /\n> D:\\sr\\programs\\x86_64-windows\\msys2-20240727\\\n>\n\nHere,\n$ cygpath -w /\nC:\\msy64\\\n\n> Extra verbosity might reveal something. For full-fat verbosity (Stack’s, Cabal’s and GHC’s), command:\n>\n>\n> stack --verbose build --cabal-verbose --ghc-options=-v turtle\n>\n\nThis is with snapshot lts-24.37\n\nI tried posting all the output, but failed, exceeding\nthe 32000 character limit.\n\nPosting just a few lines before the failure,\n\n\n %< cut >%\n\n 2026-04-21 17:22:59.659342: [info] assoc > Wanted build ways: [StaticWay]\n 2026-04-21 17:22:59.659342: [info] assoc > Running: \"C:\\ghcup\\bin\\ghc-9.10.3.exe\" \"--make\" \"-fbuilding-cabal-package\" \"-O\" \"-outputdir\" \".stack-work\\dist\\1a191874\\build\" \"-odir\" \".stack-work\\dist\\1a191874\\build\" \"-hidir\" \".stack-work\\dist\\1a191874\\build\" \"-hiedir\" \".stack-work\\dist\\1a191874\\build\\extra-compilation-artifacts\\hie\" \"-stubdir\" \".stack-work\\dist\\1a191874\\build\" \"-i\" \"-isrc\" \"-i.stack-work\\dist\\1a191874\\build\" \"-i.stack-work\\dist\\1a191874\\build\\autogen\" \"-i.stack-work\\dist\\1a191874\\build\\global-autogen\" \"-I.stack-work\\dist\\1a191874\\build\\autogen\" \"-I.stack-work\\dist\\1a191874\\build\\globa\n +l-autogen\" \"-I.stack-work\\dist\\1a191874\\build\" \"-IC:\\ghcup\\msys64\\ucrt64\\include\" \"-IC:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2-20240727\\ucrt64\\include\" \"-optP-include\" \"-optP.stack-work\\dist\\1a191874\\build\\autogen\\cabal_macros.h\" \"-this-unit-id\" \"assoc-1.1.1-F1tRInYZuki6uqqOQoYdnz\" \"-hide-all-packages\" \"-Wmissing-home-modules\" \"-no-user-package-db\" \"-package-db\" \"C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\abda8635\\pkgdb\" \"-package-db\" \".stack-work\\dist\\1a191874\\package.conf.inplace\" \"-package-id\" \"base-4.20.2.0-39f9\" \"-XHaskell2010\" \"Data.Bifunctor.Assoc\" \"Data.Bifunctor.Swap\" \"-fhide-source-pa\n +ths\"\n 2026-04-21 17:22:59.659342: [info] StateVar > creating .stack-work\\dist\\1a191874\\build\n 2026-04-21 17:22:59.659342: [info] StateVar > creating .stack-work\\dist\\1a191874\\build\\autogen\n 2026-04-21 17:22:59.674965: [info] StateVar > creating .stack-work\\dist\\1a191874\\build\\autogen\n 2026-04-21 17:22:59.674965: [info] StateVar > creating .stack-work\\dist\\1a191874\\build\\autogen\n 2026-04-21 17:22:59.674965: [info] StateVar > creating .stack-work\\dist\\1a191874\\build\\autogen\n 2026-04-21 17:22:59.674965: [info] StateVar > Preprocessing library for StateVar-1.2.2...\n 2026-04-21 17:22:59.674965: [info] StateVar > Building library for StateVar-1.2.2...\n 2026-04-21 17:22:59.674965: [info] StateVar > creating .stack-work\\dist\\1a191874\\build\n 2026-04-21 17:22:59.674965: [info] StateVar > creating .stack-work\\dist\\1a191874\\build\n 2026-04-21 17:22:59.674965: [info] StateVar > Wanted build ways: [StaticWay]\n 2026-04-21 17:22:59.674965: [info] StateVar > Running: \"C:\\ghcup\\bin\\ghc-9.10.3.exe\" \"--make\" \"-fbuilding-cabal-package\" \"-O\" \"-outputdir\" \".stack-work\\dist\\1a191874\\build\" \"-odir\" \".stack-work\\dist\\1a191874\\build\" \"-hidir\" \".stack-work\\dist\\1a191874\\build\" \"-hiedir\" \".stack-work\\dist\\1a191874\\build\\extra-compilation-artifacts\\hie\" \"-stubdir\" \".stack-work\\dist\\1a191874\\build\" \"-i\" \"-isrc\" \"-i.stack-work\\dist\\1a191874\\build\" \"-i.stack-work\\dist\\1a191874\\build\\autogen\" \"-i.stack-work\\dist\\1a191874\\build\\global-autogen\" \"-I.stack-work\\dist\\1a191874\\build\\autogen\" \"-I.stack-work\\dist\\1a191874\\build\\globa\n +l-autogen\" \"-I.stack-work\\dist\\1a191874\\build\" \"-IC:\\ghcup\\msys64\\ucrt64\\include\" \"-IC:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2-20240727\\ucrt64\\include\" \"-optP-DUSE_DEFAULT_SIGNATURES=1\" \"-optP-include\" \"-optP.stack-work\\dist\\1a191874\\build\\autogen\\cabal_macros.h\" \"-this-unit-id\" \"StateVar-1.2.2-CdQlFIDAcAmBWGT95jJYkz\" \"-hide-all-packages\" \"-Wmissing-home-modules\" \"-no-user-package-db\" \"-package-db\" \"C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\abda8635\\pkgdb\" \"-package-db\" \".stack-work\\dist\\1a191874\\package.conf.inplace\" \"-package-id\" \"base-4.20.2.0-39f9\" \"-package-id\" \"stm-2.5.3.1-7044\" \"-packag\n +e-id\" \"transformers-0.6.1.1-bf2e\" \"-XHaskell2010\" \"Data.StateVar\" \"-Wall\" \"-Wcompat\" \"-Winferred-safe-imports\" \"-Wmissing-safe-haskell-mode\" \"-fhide-source-paths\"\n 2026-04-21 17:23:04.921584: [warn] StateVar > C:\\WINDOWS\\ghc7744_0: CreateDirectory \"\\\\\\\\?\\\\C:\\\\WINDOWS\\\\ghc7744_0\": permission denied (アクセスが拒否されました。)\n 2026-04-21 17:23:04.921584: [warn] assoc > C:\\WINDOWS\\ghc6016_0: CreateDirectory \"\\\\\\\\?\\\\C:\\\\WINDOWS\\\\ghc6016_0\": permission denied (アクセスが拒否されました。)\n 2026-04-21 17:23:05.030953: [debug] Checking for project config at: C:\\Users\\drbean\\turtle-1.6.2\\stack.yaml\n 2026-04-21 17:23:05.030953: [debug] Checking for project config at: C:\\Users\\drbean\\stack.yaml\n 2026-04-21 17:23:05.030953: [debug] Checking for project config at: C:\\Users\\stack.yaml\n 2026-04-21 17:23:05.030953: [debug] Checking for project config at: C:\\stack.yaml\n 2026-04-21 17:23:05.030953: [debug] No project config file found, using defaults.\n 2026-04-21 17:23:05.046577: [debug] Use of Casa server enabled: (CasaRepoPrefix \"https://casa.stackage.org\", 1280).\n 2026-04-21 17:23:05.046577: [debug] (SQL) SELECT COUNT(*) FROM \"last_performed\" WHERE (\"action\"=?) AND (\"timestamp\">=?); [PersistInt64 1,PersistUTCTime 2026-04-20 08:23:05.0465775 UTC]\n 2026-04-21 17:23:05.046577: [error]\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 assoc-1.1.1 (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.12.1.0_ghc-9.10.3.exe --verbose=2 --builddir=.stack-work\\dist\\1a191874 build --ghc-options \"\"\n Process exited with code: ExitFailure 1\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.12.1.0_ghc-9.10.3.exe --verbose=2 --builddir=.stack-work\\dist\\1a191874 build --ghc-options \"\"\n Process exited with code: ExitFailure 1\n\n\nDiffing this with the corresponding output when run in\nstack’s MSYS2 shell doesn’t reveal any differences\nwhich seem significant (on a quick look).\n\nBut at the point where the build fails above, it has:\n\n\n 2026-04-21 17:47:15.379025: [info] StateVar > Wanted build ways: [StaticWay]\n 2026-04-21 17:47:15.379025: [info] assoc > Preprocessing library for assoc-1.1.1...\n 2026-04-21 17:47:15.379025: [info] StateVar > Running: \"C:\\ghcup\\bin\\ghc-9.10.3.exe\" \"--make\" \"-fbuilding-cabal-package\" \"-O\" \"-outputdir\" \".stack-work\\dist\\1a191874\\build\" \"-odir\" \".stack-work\\dist\\1a191874\\build\" \"-hidir\" \".stack-work\\dist\\1a1\n 91874\\build\" \"-hiedir\" \".stack-work\\dist\\1a191874\\build\\extra-compilation-artifacts\\hie\" \"-stubdir\" \".stack-work\\dist\\1a191874\\build\" \"-i\" \"-isrc\" \"-i.stack-work\\dist\\1a191874\\build\" \"-i.stack-work\\dist\\1a191874\\build\\autogen\" \"-i.stack-work\\dist\\1a191874\\build\\global-au\n togen\" \"-I.stack-work\\dist\\1a191874\\build\\autogen\" \"-I.stack-work\\dist\\1a191874\\build\\global-autogen\" \"-I.stack-work\\dist\\1a191874\\build\" \"-IC:\\ghcup\\msys64\\ucrt64\\include\" \"-IC:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2-20240727\\ucrt64\\include\" \"-\n optP-DUSE_DEFAULT_SIGNATURES=1\" \"-optP-include\" \"-optP.stack-work\\dist\\1a191874\\build\\autogen\\cabal_macros.h\" \"-this-unit-id\" \"StateVar-1.2.2-CdQlFIDAcAmBWGT95jJYkz\" \"-hide-all-packages\" \"-Wmissing-home-modules\" \"-no-user-package-db\" \"-package-db\" \"C:\\Users\\drbean\\AppDat\n a\\Roaming\\stack\\snapshots\\abda8635\\pkgdb\" \"-package-db\" \".stack-work\\dist\\1a191874\\package.conf.inplace\" \"-package-id\" \"base-4.20.2.0-39f9\" \"-package-id\" \"stm-2.5.3.1-7044\" \"-package-id\" \"transformers-0.6.1.1-bf2e\" \"-XHaskell2010\" \"Data.StateVar\" \"-Wall\" \"-Wcompat\" \"-Winferred-safe-imports\" \"-Wmissing-safe-haskell-mode\" \"-fhide-source-paths\"\n 2026-04-21 17:47:15.379025: [info] assoc > Building library for assoc-1.1.1...\n 2026-04-21 17:47:15.379025: [info] assoc > creating .stack-work\\dist\\1a191874\\build\n 2026-04-21 17:47:15.379025: [info] assoc > creating .stack-work\\dist\\1a191874\\build\n 2026-04-21 17:47:15.379025: [info] assoc > Wanted build ways: [StaticWay]\n 2026-04-21 17:47:15.379025: [info] assoc > Running: \"C:\\ghcup\\bin\\ghc-9.10.3.exe\" \"--make\" \"-fbuilding-cabal-package\" \"-O\" \"-outputdir\" \".stack-work\\dist\\1a191874\\build\" \"-odir\" \".stack-work\\dist\\1a191874\\build\" \"-hidir\" \".stack-work\\dist\\1a191874\\build\" \"-hiedir\" \".stack-work\\dist\\1a191874\\build\\extra-compilation-artifacts\\hie\" \"-stubdir\" \".stack-work\\dist\\1a191874\\build\" \"-i\" \"-isrc\" \"-i.stack-work\\dist\\1a191874\\build\" \"-i.stack-work\\dist\\1a191874\\build\\autogen\" \"-i.stack-work\\dist\\1a191874\\build\\global-autogen\" \"-I.stack-work\\dist\\1a191874\\build\\autogen\" \"-I.stack-work\\dist\\1a191874\\build\\global-autogen\" \"-I.stack-work\\dist\\1a191874\\build\" \"-IC:\\ghcup\\msys64\\ucrt64\\include\" \"-IC:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2-20240727\\ucrt64\\include\" \"-optP-include\" \"-optP.stack-work\\dist\\1a191874\\build\\autogen\\cabal_macros.h\" \"-this-unit-id\" \"assoc-1.1.1-F1tRInYZuki6uqqOQoYdnz\" \"-hide-all-packages\" \"-Wmissing-home-modules\" \"-no-user-package-db\" \"-package-db\" \"C:\\Users\\drbean\\AppData\\Roaming\\stack\\snapshots\\abda8635\\pkgdb\" \"-package-db\" \".stack-work\\dist\\1a191874\\package.conf.inplace\" \"-package-id\" \"base-4.20.2.0-39f9\" \"-XHaskell2010\" \"Data.Bifunctor.Assoc\" \"Data.Bifunctor.Swap\" \"-fhide-source-paths\"\n 2026-04-21 17:47:17.548427: [info] assoc > [1 of 2] Compiling Data.Bifunctor.Assoc\n 2026-04-21 17:47:17.564054: [info] StateVar > [1 of 1] Compiling Data.StateVar\n 2026-04-21 17:47:21.391836: [warn] StateVar > C:\\Users\\drbean\\AppData\\Roaming\\stack\\programs\\x86_64-windows\\msys2-20240727\\tmp\\stack-6c0733bca89f22e2\\StateVar-1.2.2\\src\\Data\\StateVar.hs:220:33: warning: [GHC-58520] [-Wtype-equality-requires-operators]\n 2026-04-21 17:47:21.391836: [warn] StateVar > The use of ‘~’ without TypeOperators\n 2026-04-21 17:47:21.391836: [warn] StateVar > will become an error in a future GHC release.\n 2026-04-21 17:47:21.407463: [warn] StateVar > Suggested fix: Perhaps you intended to use TypeOperators\n 2026-04-21 17:47:21.407463: [warn] StateVar > |\n 2026-04-21 17:47:21.407463: [warn] StateVar > 220 | default ($~) :: (MonadIO m, a ~ b, HasGetter t a) => t -> (a -> b) -> m ()\n 2026-04-21 17:47:21.407463: [warn] StateVar > | ^\n 2026-04-21 17:47:21.407463: [warn] StateVar >\n ...\n etc\n %< cut >%\n\n\n\nThere doesn’t seem to be any indication of where it’s storing the result of the assoc, StateVar package(?) precompilications.",
"title": "Problems using Stack in a MSYS2 shell"
}