-
Notifications
You must be signed in to change notification settings - Fork 56
Building Erlang
Below versions of Erlang are available in respective distributions at the time of creation of these build instructions:
- RHEL(8.8, 8.10) have
22.0.7
- RHEL(9.2, 9.4, 9.5) have
26.2.5
- SLES 15 SP6 has
23.3.4.19
- Ubuntu 20.04 has
22.2.7
- Ubuntu 22.04 has
24.2.1
- Ubuntu 24.04 has
25.3.2.8
- Ubuntu 24.10 has
25.3.2.12
The instructions provided below specify the steps to build Erlang version 27.2 on Linux on IBM Z for following distributions:
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
- SLES (15 SP6)
- Ubuntu (20.04, 22.04, 24.04, 24.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.
If you want to build erlang using manual steps, go to STEP 1.2.
Use the following commands to build erlang using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Erlang/27.2/build_erlang.sh
# Build erlang
bash build_erlang.sh #[Provide -t option for executing build with tests and -j to specify java to be used from { IBM_Semeru_8, IBM_Semeru_11, Eclipse_Adoptium_Temurin_11, OpenJDK11, IBM_Semeru_17, IBM_Semeru_21, Eclipse_Adoptium_Temurin_17, Eclipse_Adoptium_Temurin_21, OpenJDK17, OpenJDK21 }]
If the build completes successfully, go to STEP 1.6. In case of error, check logs
for more details or go to STEP 1.2 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y autoconf flex gawk gcc gcc-c++ gzip libxml2-devel libxslt ncurses-devel openssl-devel make tar unixODBC-devel wget
-
SLES (15 SP6)
sudo zypper install -y wget tar make gcc gcc-c++ ncurses-devel unixODBC-devel autoconf flex gawk libopenssl-1_1-devel libxml2-devel gzip libxslt-tools
-
Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get update sudo apt-get install -y curl autoconf fop flex gawk gcc g++ gzip libncurses-dev libssl-dev libxml2-utils make tar unixodbc-dev wget xsltproc pkg-config
-
With IBM Semeru Runtime
- Download and install IBM Semeru Runtime (Java 8 or 11 or 17 or 21) from here.
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11 or 17 or 21) from here.
-
With OpenJDK 8
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-1.8.0-openjdk-devel
- SLES (15 SP6)
sudo zypper install -y java-1_8_0-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-8-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
-
With OpenJDK 11
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-11-openjdk-devel
- SLES (15 SP6)
sudo zypper install -y java-11-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-11-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
-
With OpenJDK 17
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-17-openjdk-devel
- SLES (15 SP6)
sudo zypper install -y --auto-agree-with-licenses java-17-openjdk java-17-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-17-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
-
With OpenJDK 21
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y java-21-openjdk-devel
- SLES (15 SP6)
sudo zypper install -y --auto-agree-with-licenses java-21-openjdk java-21-openjdk-devel
- Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get install -y openjdk-21-jdk
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
-
Set JAVA_HOME and PATH
export JAVA_HOME=<Path to Java> export PATH=$JAVA_HOME/bin:$PATH
Note: At the time of creation of these build instructions, ErLang was verified with IBM Semeru Runtime Open Edition (build jdk8u402-b06_openj9-0.43.0)
, IBM Semeru Runtime Open Edition (build jdk-11.0.22_7_openj9-0.43.0)
,IBM Semeru Runtime Open Edition (build jdk-17.0.10_7_openj9-0.43.0)
, IBM Semeru Runtime Open Edition (build jdk-21.0.2_13_openj9-0.43.0)
, Eclipse Adoptium Temurin Runtime (build jdk-11.0.22_7)
, Eclipse Adoptium Temurin Runtime (build jdk-17.0.10_7)
, Eclipse Adoptium Temurin Runtime (build jdk-21.0.2_13)
, OpenJDK 8 (latest distro provided version)
, OpenJDK 11 (latest distro provided version)
, OpenJDK 17 (latest distro provided version)
, OpenJDK 21 (latest distro provided version)
.
cd $SOURCE_ROOT
wget https://github.com/erlang/otp/releases/download/OTP-27.2/otp_src_27.2.tar.gz
tar -xzf otp_src_27.2.tar.gz
cd otp_src_27.2
./configure --prefix=/usr
make
sudo make install
erl --version
You should see a shell shown below:
Erlang/OTP 27 [erts-15.1.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]
Eshell V15.1.3 (press Ctrl+G to abort, type help(). for help)
1>
Note: To exit from the shell type <CTRL>+G
, and then once User switch command is displayed, type q
to exit.
cd $SOURCE_ROOT/otp_src_27.2
export ERL_TOP=`pwd`
make release_tests
cd release/tests/test_server
$ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop
The 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.