-
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.4, 8.5, 8.6) have
22.0.7
- Ubuntu 18.04 has
20.2.2
- Ubuntu 20.04 has
22.2.7
- Ubuntu 22.04 has
24.2.1
- SLES 15 SP3 has
22.3-1.26
The instructions provided below specify the steps to build Erlang version 25.0.1 on Linux on IBM Z for following distributions:
- RHEL (7.8, 7.9, 8.4, 8.5, 8.6)
- SLES (12 SP5, 15 SP3)
- Ubuntu (18.04, 20.04, 22.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.
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/25.0.1/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 }]
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.4, 8.5, 8.6)
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
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) from here.
-
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
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) from here.
-
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
-
-
SLES 12 SP5
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
sudo zypper install -y autoconf flex gawk gcc gcc-c++ gzip libopenssl-devel libxml2-devel libxslt-tools ncurses-devel make tar unixODBC-devel wget xmlgraphics-fop
- Download and install IBM Semeru Runtime (Java 8 or 11) from here.
-
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
sudo zypper install -y autoconf flex gawk gcc gcc-c++ gzip libopenssl-devel libxml2-devel libxslt-tools ncurses-devel make tar unixODBC-devel wget xmlgraphics-fop
- Download and install Eclipse Adoptium Temurin Runtime (Java 11) from here.
-
With OpenJDK11
sudo zypper install -y autoconf flex gawk gcc gcc-c++ gzip libopenssl-devel libxml2-devel libxslt-tools ncurses-devel make tar unixODBC-devel wget xmlgraphics-fop java-11-openjdk-devel
-
-
SLES 15 SP3
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
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) from here.
-
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
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) from here.
-
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
-
-
Ubuntu (18.04, 20.04, 22.04)
-
With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9)
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
- Download and install IBM Semeru Runtime (Java 8 or 11) from here.
-
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
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
- Download and install Eclipse Adoptium Temurin Runtime (Java 11) from here.
-
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 openjdk-11-jdk
-
cd $SOURCE_ROOT
wget https://github.com/erlang/otp/releases/download/OTP-25.0.1/otp_src_25.0.1.tar.gz
tar -xzf otp_src_25.0.1.tar.gz
cd otp_src_25.0.1
./configure --prefix=/usr
make
sudo make install
erl --version
You should see a shell shown below:
Erlang/OTP 25 [erts-13.0.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Eshell V13.0.1 (abort with ^G)
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_25.0.1
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.