OCaml 4.14.1
This page describes OCaml version 4.14.1, released on Dec 20, 2022. Go here for a list of all releases.
This is a bug-fix release of OCaml 4.14.0.
As the last version of OCaml 4, the 4.14 branch of OCaml will be maintained during the transition period for OCaml 5. During this period, OCaml 4.14 will receive episodic bugfix updates as a long term support branch until at least 2024.
Installation Instructions
The base compiler can be installed as an opam switch with the following commands:
opam update
opam switch create 4.14.1
Configuration Options
The configuration of the installed opam switch can be tuned with the following options:
ocaml-option-afl
: sets OCaml to be compiled withafl-fuzz
instrumentationocaml-option-bytecode-only
: compiles OCaml without the native-code compilerocaml-option-flambda
: sets OCaml to be compiled withflambda
activatedocaml-option-musl
: sets OCaml to be compiled withmusl-gcc
ocaml-option-no-flat-float-array
: sets OCaml to be compiled with--disable-flat-float-array
ocaml-option-static
: sets OCaml to be compiled withmusl-gcc -static
ocaml-option-32bit
: sets OCaml to be compiled in 32-bit mode for 64-bit Linux and OS X hostsocaml-option-nnp
: sets OCaml to be compiled with--disable-naked-pointers
ocaml-option-nnpchecker
: set OCaml to be compiled with--enable-naked-pointers-checker
ocaml-option-fp
: sets OCaml to be compiled with frame-pointers enabled
For instance, one can install a switch with both flambda
and the naked-pointer checker enabled with
opam switch create 4.14.1+flambda+nnpchecker --package=ocaml-variants.4.14.1+options,ocaml-option-flambda,ocaml-option-nnpchecker
or with opam 2.1:
opam switch create 4.14.1+flambda+nnpchecker ocaml-variants.4.14.1+options ocaml-option-flambda ocaml-option-nnpchecker
Source Distribution
- Source tarball (.tar.gz) for compilation under Unix (including Linux and macOS X) and Microsoft Windows (including Cygwin).
- Also available in .zip format.
- opam is a source-based distribution of OCaml and many companion libraries and tools. Compilation and installation are automated by powerful package managers.
- The official development repo is hosted on GitHub.
The INSTALL file of the distribution provides detailed compilation and installation instructions. See also the Windows release notes for instructions on how to build under Windows.
Changes in OCaml 4.14.1 (20 December 2022)
This is the changelog.
Compiler User-Interface and Warnings:
- #11184, #11670: Stop calling
ranlib
on created / installed libraries (Sébastien Hinderer and Xavier Leroy, review by the same)
Build System:
-
#11370, #11373: Don't pass CFLAGS to flexlink during configure. (David Allsopp, report by William Hu, review by Xavier Leroy and Sébastien Hinderer)
-
#11487: Thwart FMA test optimisation during configure (William Hu, review by David Allsopp and Sébastien Hinderer)
Bug Fixes:
-
#10768, #11340: Fix typechecking regression when combining first class modules and GADTs. (Jacques Garrigue, report by François Thiré, review by Matthew Ryan)
-
#11204: Fix regression introduced in 4.14.0 that would trigger Warning 17 when calling virtual methods introduced by constraining the self type from within the class definition. (Nicolás Ojeda Bär, review by Leo White)
-
#11263, #11267: caml/{memory,misc}.h: Check whether
_MSC_VER
is defined before using it to ensure that the headers can always be used in code which turns on-Wundef
(or equivalent). (David Allsopp and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär and Sébastien Hinderer) -
#11314, #11416: Fix non-informative error message for module inclusion (Florian Angeletti, report by Thierry Martinez, review by Gabriel Scherer)
-
#11358, #11379: Refactor the initialisation of bytecode threading, This avoids a "dangling pointer" warning of GCC 12.1. (Xavier Leroy, report by Armaël Guéneau, review by Gabriel Scherer)
-
#11387: Module type with constraints no longer crash the compiler in presence of both shadowing warnings and the
-bin-annot
compiler flag. (Florian Angeletti, report by Christophe Raffalli, review by Gabriel Scherer) -
#11392, #11392: Assertion failure with
-rectypes
and external definitions (Gabriel Scherer, review by Florian Angeletti, report by Dmitrii Kosarev) -
#11417: Fix a regression which allowed virtual methods in non-virtual classes. (Leo White, review by Florian Angeletti)
-
#11468: Fix regression from #10186 (OCaml 4.13) detecting IPv6 on Windows for Mingw-w64 i686 port. (David Allsopp, review by Xavier Leroy and Sébastien Hinderer)
-
#11489, #11496: More prudent deallocation of alternate signal stack (Xavier Leroy, report by @rajdakin, review by Florian Angeletti)
-
#11516, #11524: Fix the
deprecated_mutable
attribute. (Chris Casinghino, review by Nicolás Ojeda Bär and Florian Angeletti) -
#11194, #11609: Fix inconsistent type variable names in "unbound type var" messages (Ulysse Gérard and Florian Angeletti, review Florian Angeletti and 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 multiple threads. (Marc Lasson, Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp) -
#11776: Extend environment with functor parameters in
strengthen_lazy
. (Chris Casinghino and Luke Maurer, review by Gabriel Scherer) -
#11533, #11534: Follow synonyms again in
#show_module_type
(this had stopped working in 4.14.0) (Gabriel Scherer, review by Jacques Garrigue, report by Yaron Minsky) -
#11768, #11788: Fix crash at start-up of bytecode programs in no-naked-pointers mode caused by wrong initialisation of
caml_global_data
(Xavier Leroy, report by Etienne Millon, review by Gabriel Scherer) -
#11803, #11808: On x86, the destination of an integer comparison must be a register; it cannot be a stack slot. (Vincent Laviron, review by Xavier Leroy, report by Emilio Jesús Gallego Arias)