Thicket data repository for the EEG
1{
2 "id": "https://www.tunbury.org/2025/06/10/oxcaml-base-images",
3 "title": "Base images for OxCaml",
4 "link": "https://www.tunbury.org/2025/06/10/oxcaml-base-images/",
5 "updated": "2025-06-10T00:00:00",
6 "published": "2025-06-10T00:00:00",
7 "summary": "As @dra27 suggested, I first added support in ocurrent/ocaml-version. I went with the name flambda2, which matched the name in the opam package.",
8 "content": "<p>As @dra27 suggested, I first added support in <a href=\"https://github.com/ocurrent/ocaml-version.git\">ocurrent/ocaml-version</a>. I went with the name <code>flambda2</code>, which matched the name in the <code>opam</code> package.</p>\n\n<p>Wherever I found the type <code>Flambda</code>, I added <code>Flambda2</code>. I added a list of OxCaml versions in the style of the unreleased betas and a function <code>is_oxcaml</code> to test if the variant is of type <code>Flambda2</code>, closely following the <code>is_multicore</code> design! The final change was to <code>additional_packages</code> concatenated <code>ocaml-options-only-</code> to <code>flambda2</code> - again, this change was also needed for multicore.</p>\n\n<p>It was a relatively minor change to the base-image-builder, adding <code>Ocaml_version.Releases.oxcaml</code> to the available switches on AMD64 and ARM64. Following the precedent set by <code>maybe_add_beta</code> and <code>maybe_add_multicore</code>, I added <code>maybe_add_jst</code>, which added the Jane Street opam repository for these builds.</p>\n\n<p>The builds mostly failed because they depended on <code>autoconf,</code> which isn’t included by default on most distributions. Looking in the <code>dockerfile</code>, there is a function called <code>ocaml_depexts</code>, which includes <code>zstd</code> for OCaml > 5.1.0. I extended this function to include <code>autoconf</code> when building OxCaml.</p>\n\n<p>The Arch Linux builds failed due to missing <code>which</code>, so I added this as I did for <code>autoconf</code></p>\n\n<p>The following are working:</p>\n\n<ul>\n <li>Ubuntu 24.10, 24.04, 22.04</li>\n <li>OpenSUSE Tumbleweed</li>\n <li>Fedora 42, 41</li>\n <li>Debian Unstable, Testing, 12</li>\n <li>Arch</li>\n</ul>\n\n<p>Failures</p>\n\n<ul>\n <li>Alpine 3.21\n <ul>\n <li>missing <code>linux/auxvec.h</code> header</li>\n </ul>\n </li>\n <li>OpenSUSE 15.6\n <ul>\n <li>autoconf is too old in the distribution</li>\n </ul>\n </li>\n <li>Debian 11\n <ul>\n <li>autoconf is too old in the distribution</li>\n </ul>\n </li>\n <li>Oracle Linux 9, 8\n <ul>\n <li>autoconf is too old in the distribution</li>\n </ul>\n </li>\n</ul>\n\n<p>There is some discussion about whether building these with the <a href=\"https://images.ci.ocaml.org\">base image builder</a> is the best approach, so I won’t create PRs at this time. My branches are:</p>\n<ul>\n <li><a href=\"https://github.com/mtelvers/ocaml-version.git\">https://github.com/mtelvers/ocaml-version.git</a></li>\n <li><a href=\"https://github.com/mtelvers/ocaml-dockerfile.git#oxcaml\">https://github.com/mtelvers/ocaml-dockerfile.git#oxcaml</a></li>\n <li><a href=\"https://github.com/mtelvers/docker-base-images#oxcaml\">https://github.com/mtelvers/docker-base-images#oxcaml</a></li>\n</ul>",
9 "content_type": "html",
10 "author": {
11 "name": "Mark Elvers",
12 "email": "mark.elvers@tunbury.org",
13 "uri": null
14 },
15 "categories": [
16 "oxcaml",
17 "tunbury.org"
18 ],
19 "source": "https://www.tunbury.org/atom.xml"
20}