-
Notifications
You must be signed in to change notification settings - Fork 59
Building netty tcnative
Below versions of netty-tcnative are available in respective distributions at the time of creation of these build instructions:
- SLES 15 SP7 have
2.0.75
The instructions provided below specify the steps to build netty-tcnative v2.0.77 on Linux on IBM Z for following distributions:
- RHEL (8.10, 9.6, 9.7, 10.0, 10.1)
- SLES (15 SP7, 16)
- Ubuntu (22.04, 24.04, 25.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 netty-tcnative using manual steps, go to STEP 2.
Use the following commands to build netty-tcnative using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/netty-tcnative/2.0.77/build_netty.sh
# Build netty-tcnative
bash build_netty.sh [Provide -h to see a list of supported Java JDK variant]
If the build completes successfully, go to STEP 6. In case of error, check logs for more details or go to STEP 2 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/
export PATCH_URL="https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/netty-tcnative/2.0.77/patch"-
RHEL (8.10, 9.6, 9.7, 10.0, 10.1)
sudo yum install -y ninja-build cmake perl gcc gcc-c++ libarchive openssl-devel apr-devel autoconf automake libtool make tar git wget golang curl libstdc++-static.s390x xz-devel gzip python3-devel patch
-
SLES (15 SP7, 16)
sudo zypper install -y gawk ninja cmake perl libopenssl-devel apr-devel autoconf automake libtool make tar git wget gcc gcc-c++ gzip maven go curl xz python3 patch
-
Ubuntu (22.04, 24.04, 25.10)
sudo apt-get update sudo apt-get install -y ninja-build cmake perl golang libssl-dev libapr1-dev autoconf automake libtool make tar git wget curl libtool-bin xz-utils gzip python3
cd $SOURCE_ROOT/
wget ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
tar xvfz libffi-3.2.1.tar.gz
cd libffi-3.2.1
./configure --prefix=/usr/local
make
sudo make install
sudo ldconfig
sudo ldconfig /usr/local/lib64-
With IBM Semeru Runtime
- Download and install IBM Semeru Runtime (Java 8, 11 or 17) from here (only for Ubuntu 22.04, 24.04, 25.10, RHEL and SLES).
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11 or 17) from here.
-
Download and install AdoptOpenJDK Hotspot (Java 8) from here .
-
With OpenJDK 17
-
RHEL (8.10, 9.6, 9.7)
sudo yum install -y java-17-openjdk java-17-openjdk-devel
-
SLES (15 SP7, 16)
sudo zypper install -y java-17-openjdk-devel
-
Ubuntu (22.04, 24.04, 25.10)
sudo apt-get install -y openjdk-17-jdk
-
-
With OpenJDK 11
-
RHEL (8.10, 9.6, 9.7)
sudo yum install -y java-11-openjdk-devel
-
SLES 15 SP7
sudo zypper install -y java-11-openjdk-devel
- Ubuntu (22.04, 24.04, 25.10)
sudo apt-get install -y openjdk-11-jdk
-
-
With OpenJDK 8
-
RHEL (8.10, 9.6, 9.7)
sudo yum install -y java-1.8.0-openjdk-devel.s390x
-
SLES 15 SP7
sudo zypper install -y java-1_8_0-openjdk-devel
-
Ubuntu (22.04, 24.04, 25.10)
sudo apt-get install -y openjdk-8-jre openjdk-8-jdk
-
export JAVA_HOME=/<path to java>/
export PATH=$JAVA_HOME/bin:$PATHNote: At the time of creation of these build instructions, netty-tcnative was verified with Eclipse Adoptium Temurin Runtime (Java 11 build 11.0.30_7, Java 17 build 17.0.18_8), OpenJDK Runtime Environment (AdoptOpenJDK Java 8)(build 1.8.0_8u292b10), OpenJDK 8, 11 and 17.
cd $SOURCE_ROOT
git clone -b netty-tcnative-parent-2.0.77.Final https://github.com/netty/netty-tcnative.git
cd netty-tcnative cd $SOURCE_ROOT/netty-tcnative
#Replace boringssl source code link to the one supported on s390x.
wget -O boringssl-compat.patch "${PATCH_URL}/boringssl-compat.patch"
patch -p1 < $SOURCE_ROOT/netty-tcnative/boringssl-compat.patch- Build netty-tcnative
./mvnw clean installexport LD_LIBRARY_PATH=$SOURCE_ROOT/netty-tcnative/openssl-dynamic/target/native-build/.libs/:$LD_LIBRARY_PATHThe 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 if you have any questions or feedback.