All Releases

OCaml 5.4.1

This page describes OCaml version 5.4.1, released on Feb 17, 2026. Go here for a list of all releases.

This is a bug-fix release of OCaml 5.4.0.

Installation Instructions

The base compiler can be installed as an opam switch with the following commands:

opam update
opam switch create 5.4.1

Configuration Options

The configuration of the installed opam switch can be tuned with the following options:

  • ocaml-option-afl: Set OCaml to be compiled with afl-fuzz instrumentation
  • ocaml-option-bytecode-only: Compile OCaml without the native-code compiler
  • ocaml-option-flambda: Set OCaml to be compiled with flambda activated
  • ocaml-option-musl: Set OCaml to be compiled with musl-gcc
  • ocaml-option-no-flat-float-array: Set OCaml to be compiled with --disable-flat-float-array
  • ocaml-option-static: Set OCaml to be compiled with musl-gcc -static
  • ocaml-option-address-sanitizer: Set OCaml to be compiled with address sanitiser
  • ocaml-option-leak-sanitizer: Set OCaml to be compiled with leak sanitiser
  • ocaml-option-fp: Set OCaml to be compiled with frame pointers

For instance, one can install a switch with both flambda and the --disable-flat-float-array option with

opam switch create 5.4.1+flambda+nffa ocaml-variants.5.4.1+options ocaml-option-flambda ocaml-option-no-flat-float-array

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

Bug fixes

  • #14010: Fix miscompilation / liveness errors for string operations (Mark Shinwell, Xavier Clerc, review by Xavier Leroy and Gabriel Scherer)

  • #14065: Fix function signature mismatch of __tsan_func_exit with GCC 15. Check in the configure step if the TSan provided internal builtins are the same as what we expect, introduce caml_tsan_* wrappers for the __tsan_* functions we use. (Hari Hara Naveen S, report by Hari Hara Naveen S, review by Gabriel Scherer, Antonin Decimo, Olivier Nicole)

  • #14417: Fix issue with nested packs on macOS. (Vincent Laviron, report by Kate Deplaix, review by Gabriel Scherer)

  • #14213: Fix shadow-stack-related crashes with TSan (Olivier Nicole, report by Nathan Taylor, review by Gabriel Scherer and Stefan Muenzel)

  • #14255: Fix TSan bug with C calls that take many arguments (Olivier Nicole and Miod Vallat, report by Nathan Taylor, review by Gabriel Scherer)

  • OSEC-2026-01: robustify intern.c (Xavier Leroy and Nicolas Ojeda Bar, review by Olivier Nicole, Mindy Preston, Edwin Torok, and Gabriel Scherer)