[ANN] OCaml 4.10.2

The OCaml team has the pleasure of celebrating the birthday of Grace Hopper by announcing
the release of OCaml version 4.10.2.

This exceptional release makes OCaml 4.10 available on the new macOS/arm64 platform,
and fixes some compatibility issues for the mingw64 and FreeBSD/amd64 platform.

If OCaml 4.10.1 already works on your platform of choice, this release should be
completely transparent to you (and can be safely ignored).

Note that those fixes were backported from OCaml 4.12: further improvement to the support
of the macOS/arm64 platform will happen on the 4.12 branch.

The release is available as a set of OPAM switches,
and as a source download here:

https://github.com/ocaml/ocaml/archive/4.10.2.tar.gz


OCaml 4.10.2

  • 9938, 9939: Define __USE_MINGW_ANSI_STDIO=0 for the mingw-w64 ports to
    prevent their C99-compliant snprintf conflicting with ours.
    (David Allsopp, report by Michael Soegtrop, review by Xavier Leroy)

Supported platforms:

  • 9699, 10026: add support for iOS and macOS on ARM 64 bits
    Backported from OCaml 4.12.0
    (GitHub user @EduardoRFS, review by Xavier Leroy, Nicolás Ojeda Bär
    and Anil Madhavapeddy, additional testing by Michael Schmidt)

Code generation and optimization

  • 9752, 10026: Revised handling of calling conventions for
    external C functions.
    Provide a more precise description of the types of unboxed arguments,
    so that the ARM64 iOS/macOS calling conventions can be honored.
    Backported from OCaml 4.12.0
    (Xavier Leroy, review by Mark Shinwell and Github user @EduardoRFS)

  • 9969, 9981: Added mergeable flag tqo ELF sections containing mergeable
    constants. Fixes compatibility with the integrated assembler in clang 11.0.0.
    Backported from OCaml 4.12.0
    (Jacob Young, review by Nicolás Ojeda Bär)

8 Likes

There is also a macos/arm64 binary of opam available from the releases page for your convenience, and opam repository has been updated to understand the new tier-1 constraints imposed by macos/arm (i.e. the only working compilers there are 4.10.2 and 4.12.0~dev, and opam init will now do the right thing).

There will be a number of packages that are broken due to the shift to /opt/homebrew from /usr/local for Homebrew/ARM (due to the need to keep them simultaneously installed on the same Mac), so please feel free to submit PRs to opam-repository to fix this stuff.

We’ll shortly have Mac (both Intel and ARM) testing up and running on opam-repository, so CI will catch up with reality once more, thanks to furious hacking by @patricoferris to extend our ocurrent-based CI infrastructure to support the unique vagaries of the Mac environment (notably, a total lack of native containers). We have it working locally, and are just upstreaming it now.

3 Likes

Not sure where to report this, but https://caml.inria.fr/pub/distrib/ocaml-4.10/notes/Changes is missing Content-type and all non-ascii characters are messed up