{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreielvmxpi73lxtenal5mjztjcshbb6iu7sf5yaw37de2qw6kfyqd44",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mlbiucbs7hj2"
},
"path": "/t/problems-using-stack-in-a-msys2-shell/13939#post_8",
"publishedAt": "2026-05-07T13:22:41.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"2.2. Installing on Windows"
],
"textContent": "Taking a hint from 2.2. Installing on Windows\n\nwhich says it uses Windows GetTempPath, which uses:\n\n * The path in the environment variable TMP, if TMP is set.\n\n Otherwise, the path in the environment variable TEMP, if TEMP is set.\n\n Otherwise, there is a per-user default which varies between versions of Windows. On NT and XP-ish versions, it might be: c:\\Documents and Settings\\<username>\\Local Settings\\Temp\n\n\n\n\n\n(This looks like old documentation.),\n\nI removed TMP and TEMP from the environment, (and ran stack build in the MINGW64 MSYS environment because ghcup appears to want it, with GHCUP_MSYS2_ENV=MINGW64).\n\nIt failed after getting I guess dependencies, with\n\n> 2026-05-07 21:38:16.040999: [debug] Checking if we are going to build multiple executables with the same name\n> 2026-05-07 21:38:16.056613: [debug] Executing the build plan\n> 2026-05-07 21:38:16.119120: [error] C:\\Users\\drbean\\AppData\\Roaming\\stack\\䧩\\stack-e3aa6d2b091e2520: CreateDirectory “\\\\\\?\\C:\\Users\\drbean\\AppData\\Roaming\\stack\\\\\\18921\\stack-e3aa6d2b091e2520”: does not exist (指定され\n> たパスが見つかりません。)\n\nThe strange Chinese character appears to be the spurious ‘\\18921’ in the other locale. The Japanese says, 'The specified path cannot be found.\n\nIf I run ‘stack build’ in c:\\Users\\drbean\\AppData\\Local\\Temp rather than the stack directory it appears to be looking for a subdir there..\n\n\n 2026-05-07 22:44:35.295976: [debug] Checking if we are going to build multiple executables with the same name\n 2026-05-07 22:44:35.295976: [debug] Executing the build plan\n 2026-05-07 22:44:35.311596: [error] C:\\Users\\drbean\\AppData\\Local\\Temp\\濠\\stack-d06f3642425d3259: CreateDirectory \"\\\\\\\\?\\\\C:\\\\Users\\\\drbean\\\\AppData\\\\Local\\\\Temp\\\\\\28640\\\\stack-d06f3642425d3259\": does not exist (指定されたパス\n が見つかりません。)\n\n\n\nAnd if I set TMP=C:\\Users\\drbean\\AppData\\Local\\Temp it goes back to ‘Permission denied’ in C:\\Windows",
"title": "Problems using Stack in a MSYS2 shell"
}