The release of OCaml 5.0.0 is drawing close.
In order to test the most recent bug fixes and to help you update your software
and libraries ahead of the release, we have released a second beta version
of OCaml 5.0.0, (see below for the installation instructions).
If you find any bugs, please report them here:
Compared to the first beta release, this second beta contains many small internal
standard library fixes, one configuration fix and many small bug fixes.
We also have few updates of the documentation, which introduce two new alerts:
one for the
Effect, and another for functions
unsynchronized_access to mutable state in the standard library.
Those two alerts are disabled by default, but are available for interested users.
The first release candidate for OCaml 5.0.0 is expected to follow closely this
second beta release.
If you are interested by the ongoing list of bug fixes, the updated change log for OCaml 5.0.0 is available at:
You can also follow the state of the opam ecosystem on
A short summary of the changes since the first beta release is also available below.
The base compiler can be installed as an opam switch with the following commands on opam 2.1:
opam update opam switch create 5.0.0~beta2
For previous versions of opam, the switch creation command line is slightly more verbose:
opam update opam switch create 5.0.0~beta2 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
It might be also interesting to check the new support for parallelism by installing the domainslib library with
opam install domainslib
The source code for the beta release is available at these addresses:
If you want to tweak the configuration of the compiler, you can switch to the option variant with:
opam update opam switch create <switch_name> ocaml-variants.5.0.0~beta2+options <option_list>
<option_list> is a comma separated list of
ocaml-option-* packages. For instance, for a flambda and no-flat-float-array switch:
opam switch create 5.0.0~beta2+flambda+nffa ocaml-variants.5.0.0~beta2+options ocaml-option-flambda ocaml-option-no-flat-float-array
The command line above is slightly more complicated for opam versions anterior to 2.1:
opam update opam switch create <switch_name> --packages=ocaml-variants.5.0.0~beta2+options,<option_list> --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
In both cases, all available options can be listed with “opam search ocaml-option”.
#11097: Build native-code compilers on NetBSD/aarch64
(Kate Deplaix, review by Anil Madhavapeddy)
#10875, +#11731: Add option to allocate fiber stacks and sigaltstacks with
mmap(MAP_STACK) instead of malloc. This is exposed via a configure
–enable-mmap-map-stack option, and is enabled by default on OpenBSD where
it is mandatory.
(Anil Madhavapeddy, review by Gabriel Scherer, Tom Kelly,
Michael Hendricks and KC Sivaramakrishnan).
#11652: Fix benign off-by-one error in Windows implementation of caml_mem_map.
(David Allsopp, review by Gabriel Scherer)
#11622: Prevent stack overflow when printing a constructor or record
mismatch error involving recursive types.
(Florian Angeletti, review by Gabriel Scherer)
#11732: Ensure that types from packed modules are always generalised
(Stephen Dolan and Leo White, review by Jacques Garrigue)
#11737: Fix segfault condition in Unix.stat under Windows in the presence of
(Marc Lasson, Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)
#11193, #11227: documentation on concurrency safety for mutable data types
and states in the standard library. A
unsynchronized_accessalert have been
added for functions that require user synchronizations on concurrent access.
The new alert is diabled by default.
(Florian Angeletti, review by François Pottier and KC Sivaramakrishnan )
#11526, add a
unstablealert to the Domain and Effect modules.
The new alert is disabled by default.
(Florian Angeletti, review by Nicolás Ojeda Bär, Daniel Bünzli, and
#11640: Add Flambda commonly-used options to the ocamlopt manpage
(Amandine Nangah, review by David Allsopp, Florian Angeletti,
Sébastien Hinderer, and Vincent Laviron)