{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreifede6wqwvj3eqrb6uxopqb4pkgmmzxfyqcm45knb4nckle6ssds4",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mjtoe6lrxqv2"
},
"path": "/t/problems-using-stack-in-a-msys2-shell/13939#post_5",
"publishedAt": "2026-04-19T08:35:56.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"setup - Stack"
],
"textContent": "According to a note at the end of setup - Stack\n\n\n Aiming to avoid long file paths, Stack does so in a temporary directory (named stack-tmp-<hash>) on the drive of the final destination (either in the system temporary directory, where applicable, or the root of the drive). Consequently, Stack needs permission to create a directory in that location.\n\n A Windows user account will usually have permission to create a directory in the system temporary directory.\n\n\nShouldn’t it be trying to create one in the USER temporary directory,\n\n\n C:\\Users\\drbean>echo %TMP% or %TEMP%\n C:\\Users\\drbean\\AppData\\Local\\Temp or C:\\Users\\drbean\\AppData\\Local\\Temp\n\n\nI cannot access `C:\\WINDOWS\\Temp`\n\n\n C:\\Users\\drbean>dir C:\\WINDOWS\n Volume in drive C has no label.\n Volume Serial Number is 600C-007E\n\n Directory of C:\\WINDOWS\n\n 2026/01/25 15:14 <DIR> .\n 2026/01/25 15:14 <DIR> ..\n 2019/12/08 00:11 <DIR> addins\n 2024/10/18 20:01 <DIR> appcompat\n 2025/10/15 17:26 <DIR> apppatch\n 2026/04/19 16:19 <DIR> AppReadiness\n 2016/04/06 19:08 175,956 ARIALN.tt2\n ...\n 2022/12/21 11:04 <DIR> Tasks\n 2026/04/19 16:33 <DIR> Temp\n 2022/12/01 10:12 <DIR> TextInput\n 2015/11/20 21:15 <DIR> ToastData\n 2019/12/07 18:14 <DIR> tracing\n 2023/11/15 23:40 <DIR> twain_32\n 2025/05/15 16:54 76,800 twain_32.dll\n 2022/12/02 14:20 <DIR> UpdateAssistant\n 2013/08/23 00:36 <DIR> vpnplugins\n 2019/12/07 18:14 <DIR> Vss\n 2019/12/07 18:14 <DIR> WaaS\n 2019/12/07 18:31 <DIR> Web\n ...\n C:\\Users\\drbean>dir C:\\WINDOWS\\Temp\n Volume in drive C has no label.\n Volume Serial Number is 600C-007E\n\n Directory of C:\\WINDOWS\\Temp\n\n File Not Found\n\n C:\\Users\\drbean>dir C:\\WINDOWS\\Web\n Volume in drive C has no label.\n Volume Serial Number is 600C-007E\n\n Directory of C:\\WINDOWS\\Web\n\n 2019/12/07 18:31 <DIR> .\n 2019/12/07 18:31 <DIR> ..\n 2019/12/07 18:31 <DIR> 4K\n 2019/12/07 18:15 <DIR> Screen\n 2024/03/14 19:32 <DIR> Wallpaper\n 0 File(s) 0 bytes\n 5 Dir(s) 282,429,677,568 bytes free\n\n\nThe 2 ghc files in the user tmp directory from today,\n\n\n C:\\Users\\drbean>dir C:\\Users\\drbean\\AppData\\Local\\Temp\\ghc*\n Volume in drive C has no label.\n Volume Serial Number is 600C-007E\n\n Directory of C:\\Users\\drbean\\AppData\\Local\\Temp\n\n 2026/04/19 15:55 <DIR> ghc11132_tmp_0_0\n 2026/04/16 16:08 78,336 ghc11D2.exe\n 2026/04/16 16:08 78,336 ghc3E12.exe\n 2026/04/19 15:54 81,408 ghcCD21.exe\n 2026/04/19 15:54 81,408 ghcCD22.exe\n 2026/04/16 18:23 81,408 ghcD835.exe\n 5 File(s) 400,896 bytes\n 1 Dir(s) 282,432,884,736 bytes free\n\n\nWould they be from stack’s MSYS2 builds or the '`C:\\msys64` ones?",
"title": "Problems using Stack in a MSYS2 shell"
}