Building Erlang - linux-on-ibm-z/docs GitHub Wiki
Below versions of Erlang are available in respective distributions at the time of creation of these build instructions:
- RHEL(8.6, 8.8, 8.9) have
22.0.7
- SLES 15 SP5 has
23.3.4.19
- Ubuntu 20.04 has
22.2.7
- Ubuntu 22.04 has
24.2.1
- Ubuntu 23.10 has
25.2.3
The instructions provided below specify the steps to build Erlang version 26.2.3 on Linux on IBM Z for following distributions:
- RHEL (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)
- SLES (12 SP5, 15 SP5)
- Ubuntu (20.04, 22.04, 23.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/26.2.3/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 (except RHEL 7.x and SLES 12 SP5), OpenJDK21 (except RHEL 7.x, SLES 12 SP5 and SLES 15 SP5) }]
If the build completes successfully, go to STEP 1.4. 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 (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)
-
With IBM Semeru Runtime
sudo yum install -y autoconf flex gawk gcc gcc-c++ gzip libxml2-devel libxslt ncurses-devel openssl-devel make tar unixODBC-devel wget
- Download and install IBM Semeru Runtime (Java 8 or 11 or 17 or 21) from here.
-
With Eclipse Adoptium Temurin Runtime
sudo yum install -y autoconf flex gawk gcc gcc-c++ gzip libxml2-devel libxslt ncurses-devel openssl-devel make tar unixODBC-devel wget
- Download and install Eclipse Adoptium Temurin Runtime (Java 11 or 17 or 21) from here.
-
With OpenJDK8
sudo yum install -y autoconf flex gawk gcc gcc-c++ gzip libxml2-devel libxslt ncurses-devel openssl-devel make tar unixODBC-devel wget java-1.8.0-openjdk-devel
-
With OpenJDK11
sudo yum install -y autoconf flex gawk gcc gcc-c++ gzip libxml2-devel libxslt ncurses-devel openssl-devel make tar unixODBC-devel wget java-11-openjdk-devel
-
With OpenJDK17 (not for RHEL 7.x)
sudo yum install -y autoconf flex gawk gcc gcc-c++ gzip libxml2-devel libxslt ncurses-devel openssl-devel make tar unixODBC-devel wget java-17-openjdk-devel
-
With OpenJDK21 (not for RHEL 7.x)
sudo yum install -y autoconf flex gawk gcc gcc-c++ gzip libxml2-devel libxslt ncurses-devel openssl-devel make tar unixODBC-devel wget java-21-openjdk-devel
-
-
SLES 12 SP5
-
With IBM Semeru Runtime
sudo zypper install -y autoconf flex gawk gcc gcc-c++ gzip libopenssl-devel libxml2-devel libxslt-tools libyui-ncurses-devel make tar unixODBC-devel wget xmlgraphics-fop
- Download and install IBM Semeru Runtime (Java 8 or 11 or 17 or 21) from here.
-
With Eclipse Adoptium Temurin Runtime
sudo zypper install -y autoconf flex gawk gcc gcc-c++ gzip libopenssl-devel libxml2-devel libxslt-tools libyui-ncurses-devel make tar unixODBC-devel wget xmlgraphics-fop
- Download and install Eclipse Adoptium Temurin Runtime (Java 11 or 17 or 21) from here.
-
With OpenJDK8
sudo zypper install -y autoconf flex gawk gcc gcc-c++ gzip libopenssl-devel libxml2-devel libxslt-tools libyui-ncurses-devel make tar unixODBC-devel wget xmlgraphics-fop java-1_8_0-openjdk-devel
-
With OpenJDK11
sudo zypper install -y autoconf flex gawk gcc gcc-c++ gzip libopenssl-devel libxml2-devel libxslt-tools libyui-ncurses-devel make tar unixODBC-devel wget xmlgraphics-fop java-11-openjdk-devel
-
-
SLES 15 SP5
-
With IBM Semeru Runtime
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
- Download and install IBM Semeru Runtime (Java 8 or 11 or 17 or 21) from here.
-
With Eclipse Adoptium Temurin Runtime
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
- Download and install Eclipse Adoptium Temurin Runtime (Java 11 or 17 or 21) from here.
-
With OpenJDK8
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 java-1_8_0-openjdk-devel
-
With OpenJDK11
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 java-11-openjdk-devel
-
With OpenJDK17
sudo zypper install -y --auto-agree-with-licenses java-17-openjdk java-17-openjdk-devel autoconf flex gawk gcc gcc-c++ gzip libopenssl-1_1-devel libxml2-devel libxslt-tools ncurses-devel make tar unixODBC-devel wget
-
-
Ubuntu (20.04, 22.04, 23.10)
-
With IBM Semeru Runtime
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
- Download and install IBM Semeru Runtime (Java 8 or 11 or 17 or 21) from here.
-
With Eclipse Adoptium Temurin Runtime
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
- Download and install Eclipse Adoptium Temurin Runtime (Java 11 or 17 or 21) from here.
-
With OpenJDK8
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 openjdk-8-jdk
-
With OpenJDK11
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 openjdk-11-jdk
-
With OpenJDK17
sudo apt-get install -y openjdk-17-jdk curl autoconf fop flex gawk gcc g++ gzip libncurses-dev libssl-dev libxml2-utils make tar unixodbc-dev wget xsltproc pkg-config
-
With OpenJDK21
sudo apt-get install -y openjdk-21-jdk curl autoconf fop flex gawk gcc g++ gzip libncurses-dev libssl-dev libxml2-utils make tar unixodbc-dev wget xsltproc pkg-config
-
export JAVA_HOME=<path to installed 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-26.2.3/otp_src_26.2.3.tar.gz
tar -xzf otp_src_26.2.3.tar.gz
cd otp_src_26.2.3
./configure --prefix=/usr
make
sudo make install
erl --version
You should see a shell shown below:
Erlang/OTP 26 [erts-14.2.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Eshell V14.2.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_26.2.3
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
Note:
time_SUITE:local_to_univ_utc
fails on RHEL 9.2, RHEL 9.3, Ubuntu 23.10 on amd64 and s390x.