Skip to content

Instantly share code, notes, and snippets.

@liusheng
Last active October 14, 2019 07:58
Show Gist options
  • Save liusheng/13efa18ac5d775917f46832b801c8407 to your computer and use it in GitHub Desktop.
Save liusheng/13efa18ac5d775917f46832b801c8407 to your computer and use it in GitHub Desktop.
Install netty native library
diff --git a/pom.xml b/pom.xml
index ef7eec2..e4dc6e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -369,7 +369,7 @@
<goal>run</goal>
</goals>
<configuration>
- <target if="${linkStatic}">
+ <target>
<property name="aprTarGzFile" value="apr-${aprVersion}.tar.gz" />
<property name="aprTarFile" value="apr-${aprVersion}.tar" />
<get src="http://archive.apache.org/dist/apr/${aprTarGzFile}" dest="${project.build.directory}/${aprTarGzFile}" verbose="on" />
@@ -471,7 +471,7 @@
<modules>
<module>openssl-dynamic</module>
<module>openssl-static</module>
- <module>boringssl-static</module>
+ <!--<module>boringssl-static</module>-->
<module>libressl-static</module>
</modules>
</profile>
# 修复Hadoop Yarn 下面TestCsiClient用例失败的问题:no netty_transport_native_epoll_aarch_64 in java.library.path
git clone -b netty-4.1.27.Final --single-branch https://github.com/netty/netty
git clone -b netty-tcnative-parent-2.0.12.Final https://github.com/netty/netty-tcnative
pushd netty-tcnative
# 需要:
# 1.修改pom.xml,将 'build-apr-linux-mac' profile的if条件去掉(指定条件为true不知道为啥会报错)
# 2. 修改pom.xml,将'all' profile 中的boringssl去掉,否则会报错。
apr_bin="`pwd`/openssl-dynamic/target/apr/bin/
export PATH=$PATH:$apr_bin
mvn clean install -DskipTests
apr-1-config --version
popd
pushd netty
mvn clean install -DskipTests
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment