> 3. After this step, starting a shell failed altogether with "c:/msys64/mingw64_shell.bat is
> not recognised as an internal or external command". And sure enough, there is no such file.
> Presumably it existed in step 1. So perhaps step 2 deleted it?
> [...]
> 4. As you mention, I then tried msys2_shell.cmd. It worked -- with a noticeable delay of 5
> seconds or so.
I've also just got a new Win10 laptop and had the same issue with missing mingw64_shell.bat during msys2 install. I solved it by creating mingw64.bat with the following contents:
msys2_shell.cmd -mingw64 -mintty
I deleted all old shortcuts and use this script instead. Everything seems to work fine -- can build GHC.
> * should I worry about all those install errs
No they're perfectly fine and expected. I would however re-run the pacman -Syu to make sure all packages were updated, now that the runtime has been updated already it shouldn't be updated again
and you shouldn't see any fork errors.
> * how can I debug what's happening with
> that long delay
If it's only startup and not executing of other commands or bash completion then my bet would be AV software. If bash completion is slow or commands like ls as well
you may be hitting a long standing issue some computers have in which the domain controller is being hit for every invocation of commands, causing a slowdown https://github.com/Alexpux/MSYS2-packages/issues/138 , Solution 2 from https://gist.github.com/k-takata/9b8d143f0f3fef5abdab seems to fix it for most people.
* Should I nuke the start menu shortcuts that
the msys64 installer so carefully installed
in favour of msys2_shell.cmd?
Yes, these are now dead. you need to use msys2_shell.cmd but also pass it -mingw64 so it knows what shell to start. mintty is supposed to be the default, but in case that changes you can also pass it -mintty as well to be sure it doesn't change.
I am working on a script to automate this setup, hopefully that would make it easier next time!
Cheers,
Tamar