Skip to content

Add OCaml 4.14.5, 5.5.1 and 5.5.2; build OCaml with C17 on ubuntu-latest - #77

Open
thierry-martinez wants to merge 3 commits into
ocamllibs:mainfrom
thierry-martinez:ocaml-5.5.x-versions
Open

thierry-martinez wants to merge 3 commits into
ocamllibs:mainfrom
thierry-martinez:ocaml-5.5.x-versions

Conversation

@thierry-martinez

@thierry-martinez thierry-martinez commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

stdcompatpp fails with Not_found on a compiler whose version is not in known_versions (tools/compiler_version.ml): stdcompat cannot be built with OCaml 4.14.5, 5.5.1 and 5.5.2. This adds them (and a CHANGES.md entry).

Build OCaml with C17 on ubuntu-latest: fixes the CI failures.

Every failing job is an Ubuntu job for OCaml 4.11, 4.12, 4.13 or 5.0, and each fails in the step "Setup OCaml": opam fails to build the compiler (exit code 31).

  • Since October 19, ubuntu-latest is Ubuntu 26, whose GCC 15 compiles C23 by default.
  • In C23, a declaration without prototype such as value (*)() in caml/prims.h takes no argument, so these versions no longer compile: error: too many arguments to function … expected 0, have 2.
  • OCaml 4.14.2 and 5.1+ already handle this. main's CI last passed in August, before the switch of the runner, so it would fail the same way now.

🤖 Generated with Claude Code

stdcompatpp fails with Not_found on a compiler whose version is not in
`known_versions` (tools/compiler_version.ml): stdcompat could not be
built with OCaml 5.5.1 and 5.5.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ubuntu-latest is now Ubuntu 26, whose GCC 15 defaults to C23: there, a
declaration without prototype such as `value (*)()` takes no argument,
and OCaml 4.11 to 4.13 and 5.0 fail to build (caml/prims.h: "too many
arguments to function"; opam exits with code 31 in the step Setup OCaml).
The step is run with CC="gcc -std=gnu17", which OCaml also records for
the C stubs.

OCaml 4.13.1 built this way with GCC 15.2 locally, and the tests of
stdcompat pass with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OCaml 4.14.5 has been released, and the CI jobs 4.14.x now install it:
stdcompatpp failed with Not_found since 4.14.5 was not in
`known_versions`. stdcompat builds with OCaml 4.14.5 and its tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thierry-martinez thierry-martinez changed the title Add OCaml 5.5.1 and 5.5.2 to the known compiler versions Add OCaml 4.14.5, 5.5.1 and 5.5.2; build OCaml with C17 on ubuntu-latest Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants