-
Notifications
You must be signed in to change notification settings - Fork 56
Building OCaml
aborkar-ibm edited this page Dec 26, 2022
·
47 revisions
Below versions of OCaml are available in respective distributions at the time of creation of these build instructions:
- RHEL (7.8, 7.9) has
4.05.0 - RHEL (8.4, 8.6, 8.7) has
4.07.0 - RHEL (9.0, 9.1) has
4.11.1 - SLES 12 SP5 has
4.03.0 - SLES (15 SP3, 15 SP4) has
4.05.0 - Ubuntu 18.04 has
4.05.0 - Ubuntu 20.04 has
4.08.1 - Ubuntu (22.04, 22.10) has
4.13.1
The instructions provided below specify the steps to build OCaml v5.0.0 on Linux on IBM Z for following distributions:
- RHEL (7.8, 7.9, 8.4, 8.6, 8.7, 9.0, 9.1)
- SLES (12 SP5, 15 SP3, 15 SP4)
- Ubuntu (18.04, 20.04, 22.04, 22.10)
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.
- RHEL (7.8, 7.9)
sudo subscription-manager repos --enable=rhel-7-server-for-system-z-devtools-rpms sudo yum install -y git flex bison make wget unzip tar qt5-qtbase-devel texlive devtoolset-7 autoconf automake gcc awk sed diff # Enable GCC 7 - The changes are not persistent and this command will need to be re-run every time a new terminal session is started. scl enable devtoolset-7 bash
- RHEL (8.4, 8.6, 8.7, 9.0, 9.1)
sudo yum install -y gcc make git gawk sed diffutils
- SLES 12 SP5
sudo zypper install -y automake gcc7 git make texinfo libtool pkg-config gcc7-c++ sudo rm -rf /usr/bin/gcc /usr/bin/g++ /usr/bin/cc sudo ln -s /usr/bin/gcc-7 /usr/bin/gcc sudo ln -s /usr/bin/g++-7 /usr/bin/g++ sudo ln -s /usr/bin/gcc /usr/bin/cc
- SLES (15 SP3, 15 SP4)
sudo zypper install -y gcc make git gawk sed diffutils
- Ubuntu (18.04, 20.04, 22.04, 22.10)
sudo apt-get update sudo apt-get -y install gcc make git gawk sed diffutils
cd /<source_root>/
git clone https://github.com/ocaml/ocaml.git
cd ocaml
git checkout 5.0.0./configure --enable-ocamltestmakemake testssudo make installocaml --versionThe output should be:
The OCaml toplevel, version 5.0.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.