Netty-all-4.1.3
Installing APR
- Download the apr-1.5.2 source package.
1wget https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz - Decompress apr-1.5.2.tar.gz.
1tar -xvzf apr-1.5.2.tar.gz
- Go to the apr-1.5.2 directory.
1cd apr-1.5.2
- Install APR to the /usr/local/apr directory.
1 2
./configure --prefix=/usr/local/apr make && make install
Compiling and Installing netty-tcnative-1.1.33.Fork19.jar
- Download the netty-tcnative-1.1.33.Fork19.zip source package and decompress it.
1 2
wget https://github.com/netty/netty-tcnative/archive/netty-tcnative-1.1.33.Fork19.zip unzip netty-tcnative-1.1.33.Fork19.zip
- In the pom.xml file, modify the link for downloading the apr-1.5.2.tar.gz package to prevent access timeout.
- Go to the netty-tcnative-netty-tcnative-1.1.33.Fork19 directory and open the file.
1 2
cd netty-tcnative-netty-tcnative-1.1.33.Fork19 vi pom.xml
- Press i to enter the insert mode. There are two locations for modifying the content, as shown in the following figure:
Replace http://www.us.apache.org with https://archive.apache.org.


- Press Esc, type :wq!, and press Enter to save the file and exit.
- Go to the netty-tcnative-netty-tcnative-1.1.33.Fork19 directory and open the file.
- Download openssl-1.0.2h to netty-tcnative-netty-tcnative-1.1.33.Fork19/openssl-static/target.
1 2 3
wget https://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2h.tar.gz mkdir -p netty-tcnative-netty-tcnative-1.1.33.Fork19/openssl-static/target mv openssl-1.0.2h.tar.gz netty-tcnative-netty-tcnative-1.1.33.Fork19/openssl-static/target
- Comment out the compilation part of the boringssl-static module in the pom.xml file.
- Open the file.
1vi netty-tcnative-netty-tcnative-1.1.33.Fork19/pom.xml - Press i to enter the insert mode and comment out <module>boringssl-static</module>.

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Compile and install netty-tcnative-1.1.33.Fork19.jar to the local Maven repository.
1mvn install -DskipTests

The compiled package netty-tcnative-1.1.33.Fork19.jar is in the openssl-dynamic/target/ directory.

Compiling netty-all-4.1.3.Final.jar
- Download the source package and decompress it.
wget https://github.com/netty/netty/archive/netty-4.1.3.Final.tar.gz tar -zxvf netty-4.1.3.Final.tar.gz
- Modify the pom.xml file.
- Compile netty-all-4.1.3.Final.jar.
1 2
cd netty-netty-4.1.3.Final mvn package -DskipTests

You can view the compiled netty-all-4.1.3.Final.jar package in the netty-netty-4.1.3.Final/all/target directory.

- Use the Kunpeng Porting Advisor to scan the package generated after the compilation and ensure that the package does not contain x86 .so or .jar packages.
- The compiled netty-all.4.1.3.Final.jar must be scanned by using the Kunpeng Porting Advisor to ensure that no x86 .so or .jar packages are contained. If the compiled package contains x86 .so or .jar packages, the software functions may be affected.
- For details about how to use the Kunpeng Porting Advisor, see .
Parent topic: Compilation

