-
Notifications
You must be signed in to change notification settings - Fork 56
Building OCaml
linuxonz edited this page Oct 23, 2025
·
47 revisions
Below versions of OCaml are available in respective distributions at the time of creation of these build instructions:
- RHEL 8.10 has
4.07.0 - RHEL (9.4, 9.6) have
4.11.1 - RHEL 10.0 has
5.2.0 - SLES 15 (SP6, SP7) have
4.14.2 - Ubuntu 22.04 has
4.13.1 - Ubuntu 24.04 has
4.14.1 - Ubuntu 25.04 has
5.3.0
The instructions provided below specify the steps to build OCaml v5.4.0 on Linux on IBM Z for following distributions:
- RHEL (8.10, 9.4, 9.6, 10.0)
- SLES 15 (SP6, SP7)
- Ubuntu (22.04, 24.04, 25.04)
General Notes:
- When following the steps below please use a standard permission user unless otherwise specified.
- A directory
/<source_root>/will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
export SOURCE_ROOT=/<source_root>/-
RHEL (8.10)
sudo yum install -y gcc make git gawk sed diffutils
-
RHEL (9.4, 9.6, 10.0)
sudo yum install -y gcc gcc-c++ make git gawk sed diffutils binutils hostname tar unzip cmake curl wget vim patch tcl gettext autoconf libtool automake bzip2 zlib zlib-devel bison
-
SLES 15 (SP6, SP7)
sudo zypper install -y gcc make git-core gawk sed diffutils
-
Ubuntu (22.04, 24.04, 25.04)
sudo apt-get update sudo apt-get -y install gcc make git gawk sed diffutils
cd $SOURCE_ROOT
git clone -b 5.4.0 https://github.com/ocaml/ocaml.git
cd ocaml./configure --enable-ocamltestmakesudo make installmake testsocaml --versionThe output should be:
The OCaml toplevel, version 5.4.0The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.