-
Notifications
You must be signed in to change notification settings - Fork 56
Building netty tcnative
Below versions of netty-tcnative are available in respective distributions at the time of creation of these build instructions:
- SLES 15 SP2 has
1.1.33
The instructions provided below specify the steps to build netty-tcnative v2.0.34 on Linux on IBM Z for following distributions:
- RHEL (7.6, 7.7, 7.8, 8.1, 8.2)
- SLES (12 SP5, 15 SP1, 15 SP2)
- Ubuntu (18.04, 20.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 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.34/build_netty.sh
# Build netty-tcnative
bash build_netty.sh
If the build completes successfully, go to STEP 5. In case of error, check logs for more details or go to STEP 2 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/-
RHEL (7.6, 7.7. 7.8)
sudo subscription-manager repos --enable=rhel-7-server-for-system-z-rhscl-rpms sudo yum install -y perl devtoolset-7-gcc-c++ devtoolset-7-gcc openssl-devel apr-devel autoconf automake libtool make tar git java-1.8.0-openjdk-devel wget bzip2 zlib-devel golang patch
-
RHEL (8.1, 8.2)
sudo yum install -y cmake perl gcc gcc-c++ openssl-devel apr-devel autoconf automake libtool make tar git java-1.8.0-openjdk-devel wget python2 bzip2 zlib zlib-devel git xz diffutils maven golang patch sudo ln /usr/bin/python2 /usr/bin/python
-
SLES 12 SP5
sudo zypper install -y cmake perl libopenssl-devel libapr1-devel autoconf automake libtool make tar git java-1_8_0-openjdk-devel gcc7 gcc7-c++ wget which patch sudo ln -sf /usr/bin/gcc-7 /usr/bin/gcc sudo ln -sf /usr/bin/g++-7 /usr/bin/g++ sudo ln -sf /usr/bin/gcc /usr/bin/cc
-
SLES (15 SP1, 15 SP2)
sudo zypper install -y awk ninja cmake perl libopenssl-devel autoconf automake libtool make tar git java-1_8_0-openjdk-devel wget apr-devel zlib-devel gcc gcc-c++ patch gzip sudo ln -sf /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc
-
Ubuntu (18.04, 20.04)
sudo apt-get update sudo apt-get install -y ninja-build cmake perl golang libssl-dev libapr1-dev autoconf automake libtool make tar git openjdk-8-jdk maven patch
export JAVA_HOME=/<path to java>/
export JAVA_HOME=/usr/lib64/jvm/jre-1.8.0-openjdk #(Only for SLES 12-SP5)
export PATH=$JAVA_HOME/bin:$PATHnetty requires GCC 7. It is available on RHEL 7.x via the 'Software Collections' packaging system. You can find out more about Software Collections here: https://www.softwarecollections.org/en/.
Following command will enable GCC 7. The changes are not persistent and these commands will need to be re-run every time a new terminal session is started.
scl enable devtoolset-7 bash
cd $SOURCE_ROOT
git clone https://github.com/ninja-build/ninja
cd ninja
git checkout v1.8.2
./configure.py --bootstrap
export PATH=$SOURCE_ROOT/ninja:$PATH cd $SOURCE_ROOT
wget http://www.eu.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar -xvzf apache-maven-3.6.3-bin.tar.gz
export PATH=$PATH:$SOURCE_ROOT/apache-maven-3.6.3/bin/ cd $SOURCE_ROOT
wget https://storage.googleapis.com/golang/go1.13.1.linux-s390x.tar.gz
tar -xzf go1.13.1.linux-s390x.tar.gz
export PATH=$SOURCE_ROOT/go/bin:$PATH
export GOROOT=$SOURCE_ROOT/go
export GOPATH=$SOURCE_ROOT/go/bin cd $SOURCE_ROOT
wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz
tar xzf cmake-3.7.2.tar.gz
cd cmake-3.7.2
./configure --prefix=/usr/local
make && sudo make install cd $SOURCE_ROOT
git clone https://github.com/netty/netty-tcnative.git
cd netty-tcnative
git checkout netty-tcnative-parent-2.0.34.Final cd $SOURCE_ROOT/netty-tcnative
#Replace boringssl source code link to the one supported on s390x.
sed -i '58,58 s/chromium-stable/patch-s390x-Aug2019/g' pom.xml
sed -i '84,84 s/boringssl.googlesource.com/github.com\/linux-on-ibm-z/g' boringssl-static/pom.xml
mvn installexport LD_LIBRARY_PATH=$SOURCE_ROOT/netty-tcnative/openssl-dynamic/target/native-build/.libs/:$LD_LIBRARY_PATHhttp://netty.io/wiki/forked-tomcat-native.html
https://github.com/netty/netty-tcnative
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.