Cygwin aarch64 command-line weirdness with PowerShell?
Johannes Schindelin
Johannes.Schindelin@gmx.de
Tue Nov 10 09:45:24 GMT 2026
Hi Jon & Aswin,
On Tue, 10 Nov 2026, Jon Turney wrote:
> I've made some progress on plumbing support for aarch64 into the Cygwin
> packaging system.
>
> We're now providing a very minimal set of aarch64 packages in our
> package repository (i.e. just cygwin and bash (statically linked and
> without readline), at the moment).
>
> Assuming you have a Windows 11 arrch64 machine, you can install those
> aarch64 packages using the x86_64 build of the very latest Cygwin setup
> (2.941), and providing the '--arch aarch64' option.
>
> But I don't have any aarch64 hardware, so I can't usefully test or debug
> any of it.
>
>
> In brief experiments with a GitHub aarch64 runner, 'bash --login' from
> powershell fails bizarrely [1] with "/usr/bin/bah: --loginn: invalid
> option" [sic], but the same thing succeeds from cmd [2].
>
> Which maybe suggests something strange going on with the handling of the
> command line?
I was able to reproduce and diagnose it. It's Cygwin's source code itself,
which removes the quotes that PowerShell (but not CMD) adds around the
executable name; That logic uses `strcpy()` on overlapping regions, which
isn't correct, but the generic x86_64 implementation seems to paper over
that.
Patch incoming.
Ciao,
Johannes
>
> I wonder if you've seen anything like that? On the one hand, it's easy
> to imagine that I've broken something somewhere. On the other, it seems
> at least vaguely plausible that running things from powershell hasn't
> been well tested yet?
>
>
>
> [1]
> https://github.com/jon-turney/cygwin-install-action/actions/runs/42503733902
> [2]
> https://github.com/jon-turney/cygwin-install-action/actions/runs/42503712485
>
>
More information about the Cygwin-developers
mailing list