ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.
https://opam.ocaml.org
Creative Commons Zero v1.0 Universal
515 stars 1.12k forks source link

BER MetaOCaml for arm64 #21355

Open biboudis opened 2 years ago

biboudis commented 2 years ago

While creating the switch for BER Metaocaml I face this issue. Of course this doesnt happen when I run the shell under Rosetta shell but it would be preferable to use the "native" dependency.

❯ opam switch create 4.11.1+BER

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml-variants" {= "4.11.1+BER"}]
[ERROR] Could not determine which packages to install for this switch:
  * Missing dependency:
    - ocaml-variants = 4.11.1+BER
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'

If someone volunteers to assist me I can provide and test the fix in a separate PR.

mseri commented 2 years ago

metaocaml is not available for arm macos versions, this seems to be the issue here. Only ocaml versions 4.10.2 and > 4.12 support macos with arm64

JacquesCarette commented 7 months ago

Darn. I was hoping to demo metaocaml to my class today, and ran into this problem.

biboudis commented 7 months ago

A workaround for me back then was to enable the emulation mode via the following command:

env /usr/bin/arch --x86_64 /bin/zsh --login

JacquesCarette commented 7 months ago

Thanks - that worked beautifully. I've also emailed Oleg, asking what his plans are for upgrading metocaml to > 4.12.