ARM Windows installation as of today

Today I’m trying to install Mingw-OCaml on Windows (ARM). I am following the instructions here:

It says:

“At init-time, opam scans your machine for available Unix environments and prompts you to choose your favourite option. We recommend to let it create its own internal Cygwin installation that will remain managed by opam. This cuts down possible interferences from other tools that interact with such environments. Think of it as a sandboxed environment.”

But this doesn’t happen. All I get is a prompt to change shell. Opam init completes, and then running opam switch create 5.2.0 I get

<><> Installing new switch packages <><><>>><>><»<><><><><><><><><><><><><><>

invariant: ["ocaml-base-compiler"

[NOTE] It seems you have not updated your repositories for a while. Consider updating them with:

opam update

[ERROR] Could not determine which packages to install for this switch:

* Incompatible packages:

- (invariant) -> ocaml-base-compiler >= 5.2.0  → host-arch-arm64 
- (invariant) → ocaml-base-compiler >= 5.2.0 -> system-mingw -> ocaml-env-mingw32 → host-arch-x86 32

You can temporarily relax the switch invariant with '--update-invariant'

Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [y/n] y

I notice it’s opam 2.2.0 not opam 2.2.1 as shown on the web page, though.

Has anyone successfully installed mingw-ocaml on ARM Windows? Is it supposed to work?

If not, is there a known method to get OCaml on Windows ARM with an environement where I can build plain Windows binaries suitable for distribution?

OCaml can only run on a Windows ARM64 machine through x86_64 emulation. I did some testing during opam 2.2’s development to check that an amd64 opam binary correctly recognised that it was running on an ARM64 host, but I didn’t try any further than that.

Thanks David. I’ll do some testing to find out how slow the software runs when emulated, and update the docs to remind users emulation is available.

1 Like