-
1 编译环境准备1.1 安装Openjdk下载并安装到指定目录(如/opt/tools/installed):wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gztar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gzmv jdk8u191-b12 /opt/tools/installed/配置java环境变量,在/etc/profile文件末尾处增加下面的代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12PATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME PATH运行下面命令,使修改的环境变量生效:source /etc/profile1.2 安装Maven下载并安装到指定目录(如/opt/tools/installed):wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gztar -zxf apache-maven-3.5.4-bin.tar.gzmv apache-maven-3.5.4 /opt/tools/installed/修改maven环境变量,在/etc/profile文件末尾增加下面高亮代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME PATH运行下面的命令,是修改的环境变量生效:source /etc/profile1.3 安装Gcc等依赖项挂载OS镜像:mount YOUR_OS.iso /media -o loop修改/etc/yum.repos.d/Base.repo文件,配置yum本地源:[Local]name=CentOS-7.4 Localbaseurl=file:///media/enabled=1gpgcheck=0运行下面的命令,使yum源配置生效:yum clean allyum makecacheyum安装GCC等相关依赖:yum install git gcc gcc-c++ make cmake libtool autoconf automake -y1.4 解决-fsigned-char问题1.使用command -v gcc命令寻找gcc所在路径(一般位于/usr/bin/gcc)2.更改gcc的名字(比如改成gcc-impl)3.在gcc所在目录执行vim gcc,并填入如下内容保存:#! /bin/sh/usr/bin/gcc-impl -fsigned-char “$@”4.执行chmod +x gcc给脚本添加执行权限5.使用与1-4步相似的方式给g++创建同名字的脚本文件2 组件编译安装下载rocksdbjni-5.7.3源码,并解压wget https://codeload.github.com/facebook/rocksdb/zip/v5.7.3unzip v5.7.3cd rocksdb-5.7.3修改Makefile,将DEBUG_LEVEL设为0编译打包,rocksdbjni-5.7.3-linux64.jar在rocksdb-5.7.3/java/target目录PORTABLE=1 make rocksdbjava -j83 测试无4 FAQQ: 为何编译好的jar包大小比从Maven仓库下载的大?A: Jar包内的librocksdbjni-linux64.so包含符号信息,可通过strip命令去掉。Q: 提示找不到jni.h或者jni_md.h?A: 将编译使用的JDK中的jni.h和jni_md.h移动到编译根目录。 Q:编译时报错:A: 使用以下编译命令进行编译PORTABLE=1 make rocksdbjava -j8Q:编译时出现错误:va_list不能与nullptr进行比较A:注释掉java/rocksjni/loggerjnicallback.cc的151行,重新编译Q:遇到找不到jni.h的问题是因为没有配置JAVA_HOME路径,需要配置再次编如果还出错,则将编译使用的JDK中的jni.h和jni_md.h移动到编译根目录。转自:https://bbs.huaweicloud.com/forum/thread-42776-1-1.html
-
一、编译环境准备1.1 安装Openjdk下载并安装到指定目录(如/opt/tools/installed):wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gztar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gzmv jdk8u191-b12 /opt/tools/installed/配置java环境变量,在/etc/profile文件末尾处增加下面的代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12PATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME PATH运行下面命令,使修改的环境变量生效:source /etc/profile1.2 安装Maven下载并安装到指定目录(如/opt/tools/installed):wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gztar -zxf apache-maven-3.5.4-bin.tar.gzmv apache-maven-3.5.4 /opt/tools/installed/修改maven环境变量,在/etc/profile文件末尾增加下面高亮代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME PATH运行下面的命令,是修改的环境变量生效:source /etc/profile修改maven配置文件中的:本地仓路径、远程仓等:<!--默认在“~/.m2/”目录下,修改成你自己想保存的目录--><localRepository>/path/to/local/repo</localRepository> <!--修改成自己搭建的maven仓库,ARM使能后的jar包替换到该仓库--><mirror></mirror> 二、软件移植分析--三、依赖库编译3.1 第三方依赖包3.1.1 编译netty-all-4.1.17.Final.jar请参考链接https://bbs.huaweicloud.com/forum/thread-22723-1-1.html 编译netty-all-4.1.17.Final.jar。四、Jar包编译从官网上下载源码并解压:wget https://github.com/apache/hbase-thirdparty/archive/2.0.0RC0.tar.gztar -zxf 2.0.0RC0.tar.gzcd hbase-thirdparty-2.0.0RC0执行编译:mvn install -DskipTests编译完成后在hbase-shaded-netty/target目录下生成jar包:五、参考信息--六、FAQQuestion1:无法执行“patch”Answer1:缺少patch,需手动安装yum -y install patchQuestion2:无法找到libnetty_transport_native_epoll_x86_64.soAnswer2:修改hbase-shaded-netty/pom.xml文件,将x86_64修改为aarch_64 【来自转载】
-
1 软件介绍Netty是为快速开发和维护高性能协议服务端和客户端开发的异步事件驱动应用框架。2 预置条件类别子项版本硬件CPU鲲鹏920OSCentOS7.6软件GCC4.8.5Maven3.5.4 3 依赖包下载安装安装git gcc gcc-c++ make cmake libtools。yum install git gcc gcc-c++ make cmake libtools -y ARM平台下gcc、g++默认使用unsigned char和x86下表现不同,ARM下需要做出修改。mv /usr/bin/gcc /usr/bin/gcc-implecho ‘gcc-impl –fsigned-char “$@” ’ > /usr/bin/gccchmod 655 /usr/bin/gcc mv /usr/bin/g++ /usr/bin/g++-implecho ‘g++-impl –fsigned-char “$@” ’ > /usr/bin/g++chmod 655 /usr/bin/g++ 4 源码下载,编译安装4.1 netty-tcnative-1.1.33.Fork15编译下载netty-tcnative-1.1.33.Fork15源码并解压:wget https://github.com/netty/netty-tcnative/archive/netty-tcnative-1.1.33.Fork15.tar.gztar -zxvf netty-tcnative-1.1.33.Fork15.tar.gz 进入netty-tcnative解压目录:cd netty-tcnative-netty-tcnative-1.1.33.Fork154.1.1 pom.xml修改修改pom.xml,屏蔽boringssl的编译,解除libressl的注释。 注释掉下载apr-1.5.2的部分(有2处)。4.1.2 openssl-static/pom.xml修改修改openssl-static/pom.xml,注释掉下载openssl-1.0.2g的部分(有2处)。4.1.3 libressl-static/pom.xml修改修改libressl-static/pom.xml,注释下载libressl-2.5.5的部分(有1处). 修改22行1.1.33.Fork13.SNAPSHOT为1.1.33.Fork15。4.1.4 依赖包下载手动下载依赖包apr、openssl和libressl并放置到指定地点,命令如下:wget https://archive.apache.org/dist/apr/apr-1.5.2.tar.gzwget https://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2g.tar.gzwget http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.5.5.tar.gz mkdir –p openssl-static/targetmkdir –p libressl-static/target cp apr-1.5.2.tar.gz openssl-static/targetcp apr-1.5.2.tar.gz libressl-static/targetcp openssl-1.0.2g.tar.gz openssl-static/targetcp libressl-2.3.2.tar.gz libressl-static/target4.1.5 编译安装编译打包到maven本地仓库。mvn install如图即为编译成功。4.2 netty-4.0.36.Final编译安装4.2.1 下载源码包下载源码包所需指令如下:wget https://github.com/netty/netty/archive/netty-4.0.36.Final.tar.gztar -zxvf netty-4.0.36.Final.tar.gz 进入解压文件夹。cd netty-netty-4.0.36.Final 4.2.2 修改pom.xml注释第225行os.dectection部分4.2.3 编译进入netty-netty-4.0.36.Final解压目录。cd netty-netty-4.0.36.Final 编译打成jar包。mvn package –DskipTests如图即为编译成功,netty-all-4.0.52.Final.jar在netty-netty-4.0.36.Final/all/target目录。
-
1. 扫描安装包kafkahttp://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.0.0-78/kafka/kafka_3_1_0_0_78-2.0.0.3.1.0.0-78.noarch.rpm2. 如图2个jar包不需要移植,请参照checkso的逻辑,对于有两个架构的同名so只要有aarch64架构,就认同此jar不需要重新移值。
-
当前maven仓存在重复disclaimer-1.0.0.jar包归档路径:https://mirrors.huaweicloud.com/repository/maven/kunpeng/readme/disclaimer/1.0.0/https://mirrors.huaweicloud.com/repository/maven/kunpeng/Readme/Disclaimer/1.0.0/另外:https://mirrors.huaweicloud.com/repository/maven/kunpeng/readme/readme/1.0/readme-1.0.jar 路径不存在;https://mirrors.huaweicloud.com/repository/maven/kunpeng/readme/readme/1.0.0/readme-1.0.0.jar跟https://mirrors.huaweicloud.com/repository/maven/kunpeng/readme/disclaimer/1.0.0/disclaimer-1.0.0.jar是同一个jar包;
-
1 编译环境准备1.1 安装Openjdk下载并安装到指定目录(如/opt/tools/installed):wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gztar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gzmv jdk8u191-b12 /opt/tools/installed/配置java环境变量,在/etc/profile文件末尾处增加下面的代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12PATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME PATH运行下面命令,使修改的环境变量生效:source /etc/profile1.2 安装Maven下载并安装到指定目录(如/opt/tools/installed):wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gztar -zxf apache-maven-3.5.4-bin.tar.gzmv apache-maven-3.5.4 /opt/tools/installed/修改maven环境变量,在/etc/profile文件末尾增加下面高亮代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME PATH运行下面的命令,是修改的环境变量生效:source /etc/profile修改maven配置文件中的:本地仓路径、远程仓等:<!--默认在“~/.m2/”目录下,修改成你自己想保存的目录--><localRepository>/path/to/local/repo</localRepository> <!--修改成自己搭建的maven仓库,ARM使能后的jar包替换到该仓库--><mirror></mirror> 2 软件移植分析--3 依赖库编译3.1 第三方依赖包3.1.1 编译netty-all-4.1.17.Final.jar请参考链接https://bbs.huaweicloud.com/forum/thread-22723-1-1.html 编译netty-all-4.1.17.Final.jar。4 Jar包编译从官网上下载源码并解压:wget https://github.com/apache/hbase-thirdparty/archive/2.0.0RC0.tar.gztar -zxf 2.0.0RC0.tar.gzcd hbase-thirdparty-2.0.0RC0执行编译:mvn install -DskipTests编译完成后在hbase-shaded-netty/target目录下生成jar包:5 参考信息--6 FAQQuestion1:无法执行“patch”Answer1:缺少patch,需手动安装yum -y install patchQuestion2:无法找到libnetty_transport_native_epoll_x86_64.soAnswer2:修改hbase-shaded-netty/pom.xml文件,将x86_64修改为aarch_64
-
1 简介SQLite JDBC 是一个用于使用Java 访问和创建SQLite数据库文件的库。 2 编译环境准备2.1 安装Openjdk下载并安装到指定目录(如/opt/tools/installed):wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gztar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gzmv jdk8u191-b12 /opt/tools/installed/配置java环境变量,在/etc/profile文件末尾处增加下面的代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12PATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME PATH运行下面命令,使修改的环境变量生效:source /etc/profile2.2 安装Maven下载并安装到指定目录(如/opt/tools/installed):wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gztar -zxf apache-maven-3.5.4-bin.tar.gzmv apache-maven-3.5.4 /opt/tools/installed/修改maven环境变量,在/etc/profile文件末尾增加下面高亮代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME PATH运行下面的命令,是修改的环境变量生效:source /etc/profile2.3 安装Gcc等依赖项挂载OS镜像:mount YOUR_OS.iso /media -o loop修改/etc/yum.repos.d/Base.repo文件,配置yum本地源:[Local]name=CentOS-7.4 Localbaseurl=file:///media/enabled=1gpgcheck=0运行下面的命令,使yum源配置生效:yum clean allyum makecacheyum安装GCC等相关依赖:yum install git gcc gcc-c++ make cmake libtool autoconf automake -y2.4 解决-fsigned-char问题1.使用command -v gcc命令寻找gcc所在路径(一般位于/usr/bin/gcc)2.更改gcc的名字(比如改成gcc-impl)3.在gcc所在目录执行vim gcc,并填入如下内容保存:#! /bin/sh/usr/bin/gcc-impl -fsigned-char “$@”4.执行chmod +x gcc给脚本添加执行权限5.使用与1-4步相似的方式给g++创建同名字的脚本文件3 组件编译安装下载sqlite-jdbc-3.8.11.2源码,并解压wget https://github.com/xerial/sqlite-jdbc/archive/3.8.11.2.zipunzip 3.8.11.2.zipcd sqlite-jdbc-3.8.11.2修改Makefile:执行编译:make
-
1简介Snappy 是一个 C++ 的用来压缩和解压缩的开发包。其目标不是最大限度压缩或者兼容其他压缩格式,而是旨在提供高速压缩速度和合理的压缩率。官方链接:http://google.github.io/snappy/类别:压缩Java开发包 2编译环境安装2.1安装OpenJDK下载并安装到指定目录(如/opt/tools/installed):wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gztar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gzmv jdk8u191-b12 /opt/tools/installed/配置java环境变量,在/etc/profile文件末尾处增加下面的代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12PATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME PATH运行下面命令,使修改的环境变量生效:source /etc/profile2.2安装Maven下载并安装到指定目录(如/opt/tools/installed):wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gztar -zxf apache-maven-3.5.4-bin.tar.gzmv apache-maven-3.5.4 /opt/tools/installed/修改maven环境变量,在/etc/profile文件末尾增加下面高亮代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME PATH运行下面的命令,是修改的环境变量生效:source /etc/profile修改maven配置文件中的:本地仓路径、远程仓等:<!--默认在“~/.m2/”目录下,修改成你自己想保存的目录--><localRepository>/path/to/local/repo</localRepository> <!--修改成自己搭建的maven仓库,ARM使能后的jar包替换到该仓库--><mirror></mirror>2.3 其他依赖安装安装git gcc gcc-c++ make cmake libtoolsyum install git gcc gcc-c++ make cmake libtools -y2.4 解决-fsigned-char问题1.使用command -v gcc命令寻找gcc所在路径(一般位于/usr/bin/gcc)2.更改gcc的名字(比如改成gcc-impl)3.在gcc所在目录执行vim gcc,并填入如下内容保存:#! /bin/sh/usr/bin/gcc-impl -fsigned-char “$@”4.执行chmod +x gcc给脚本添加执行权限5.使用与1-4步相似的方式给g++创建同名字的脚本文件 3组件编译安装 从github下载源码并解压wget https://github.com/xerial/snappy-java/archive/1.1.1.6.zipmv 1.1.1.6.zip snappy-java-1.1.1.6.zipunzip snappy-java-1.1.1.6.zip 执行编译cd snappy-java-1.1.1.6make编译后结果: 编译出的jar包位于:target/snappy-java-1.1.1.6.jar4 FAQ4.1 问题14.1.1 现象:提示无法下载sbt-launch.jar4.1.2 解决方案修改sbt文件中的下载地址。 如果还是下载不了,可以手动下载到如下目录,再编译:cd /root/.sbt/launchers/0.13.6/wget http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.6/sbt-launch.jar
-
1 编译环境准备1.1 安装Openjdk下载并安装到指定目录(如/opt/tools/installed):wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gztar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gzmv jdk8u191-b12 /opt/tools/installed/配置java环境变量,在/etc/profile文件末尾处增加下面的代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12PATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME PATH运行下面命令,使修改的环境变量生效:source /etc/profile1.2 安装Maven下载并安装到指定目录(如/opt/tools/installed):wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gztar -zxf apache-maven-3.5.4-bin.tar.gzmv apache-maven-3.5.4 /opt/tools/installed/修改maven环境变量,在/etc/profile文件末尾增加下面高亮代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME PATH运行下面的命令,是修改的环境变量生效:source /etc/profile1.3 安装Gcc等依赖项挂载OS镜像:mount YOUR_OS.iso /media -o loop修改/etc/yum.repos.d/Base.repo文件,配置yum本地源:[Local]name=CentOS-7.4 Localbaseurl=file:///media/enabled=1gpgcheck=0运行下面的命令,使yum源配置生效:yum clean allyum makecacheyum安装GCC等相关依赖:yum install git gcc gcc-c++ make cmake libtool autoconf automake -y1.4 解决-fsigned-char问题1.使用command -v gcc命令寻找gcc所在路径(一般位于/usr/bin/gcc)2.更改gcc的名字(比如改成gcc-impl)3.在gcc所在目录执行vim gcc,并填入如下内容保存:#! /bin/sh/usr/bin/gcc-impl -fsigned-char “$@”4.执行chmod +x gcc给脚本添加执行权限5.使用与1-4步相似的方式给g++创建同名字的脚本文件2 组件编译安装下载rocksdbjni-5.7.3源码,并解压wget https://codeload.github.com/facebook/rocksdb/zip/v5.7.3unzip v5.7.3cd rocksdb-5.7.3修改Makefile,将DEBUG_LEVEL设为0编译打包,rocksdbjni-5.7.3-linux64.jar在rocksdb-5.7.3/java/target目录PORTABLE=1 make rocksdbjava -j83 测试无4 FAQQ: 为何编译好的jar包大小比从Maven仓库下载的大?A: Jar包内的librocksdbjni-linux64.so包含符号信息,可通过strip命令去掉。Q: 提示找不到jni.h或者jni_md.h?A: 将编译使用的JDK中的jni.h和jni_md.h移动到编译根目录。 Q:编译时报错:A: 使用以下编译命令进行编译PORTABLE=1 make rocksdbjava -j8Q:编译时出现错误:va_list不能与nullptr进行比较A:注释掉java/rocksjni/loggerjnicallback.cc的151行,重新编译Q:遇到找不到jni.h的问题是因为没有配置JAVA_HOME路径,需要配置再次编如果还出错,则将编译使用的JDK中的jni.h和jni_md.h移动到编译根目录。
-
1 简介 Scala-compiler,是scala语言的一个编译器。2 编译环境配置2.1 安装Openjdk下载并安装到指定目录(如/opt/tools/installed):wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gztar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gzmv jdk8u191-b12 /opt/tools/installed/配置java环境变量,在/etc/profile文件末尾处增加下面的代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12PATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME PATH运行下面命令,使修改的环境变量生效:source /etc/profile2.2 安装Maven下载并安装到指定目录(如/opt/tools/installed):wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gztar -zxf apache-maven-3.5.4-bin.tar.gzmv apache-maven-3.5.4 /opt/tools/installed/修改maven环境变量,在/etc/profile文件末尾增加下面高亮代码:JAVA_HOME=/opt/tools/installed/jdk8u191-b12MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME PATH运行下面的命令,是修改的环境变量生效:source /etc/profile修改maven配置文件中的:本地仓路径、远程仓等:<!--默认在“~/.m2/”目录下,修改成你自己想保存的目录--><localRepository>/path/to/local/repo</localRepository> <!--修改成自己搭建的maven仓库,ARM使能后的jar包替换到该仓库--><mirror></mirror>2.3 安装ant下载ant 1.7.1版本并解压:wget https://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.tar.gztar -xzf apache-ant-1.7.1-bin.tar.gz运行下面命令,使修改的环境变量生效:JAVA_HOME=/opt/tools/installed/jdk8u191-b12ANT_HOME=/opt/tools/apache-ant-1.7.1MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/libPATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATHexport MAVEN_HOME JAVA_HOME ANT_HOME CLASSPATH PATH 运行下面命令,使修改的环境变量生效:source /etc/profile 3 组件编译安装 1)从github官方网站下载对应版本源码并解压git clone https://github.com/scala/scala.gitcd scalagit checkout v2.11.72)编译jline-2.12.1,参考链接https://bbs.huaweicloud.com/forum/thread-22742-1-1.html编译并将编译过后的jline-2.12.1.jar替换到maven本地仓库3)执行编译ant会在./build/pack/lib目录下生成对应的jar包:将scala-compiler.jar重命名为scala-compiler-2.11.7.jar
-
软件分析构建中心RPM重构问题场景: 软件分析构建中心RPM重构 内网环境,配置代理问题现场: jar包经常下载失败问题原因: 下载的处理有问题,建链成功后,第一次下载失败,应用没有重新再去请求,页面上多次重新执行“软件构建”,jar能下载到data建议: 软件分析构建中心建议应用层增加重试次数,至少3次,不然很容易构建失败问题抓包:没有应用层重试报文。[root@centos-164 ~]# tcpdump -i any port 8080 -s0 -Atcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes10:22:15.109368 IP centos-164.55728 > 192.168.102.225.webcache: Flags [S], seq 1214886243, win 29200, options [mss 1460,sackOK,TS val 1051570889 ecr 0,nop,wscale 7], length 0E..<..@.@.....f...f.....Hi.c......r.O..........>...........................10:22:15.109382 IP centos-164.55728 > 192.168.102.225.webcache: Flags [S], seq 1214886243, win 29200, options [mss 1460,sackOK,TS val 1051570889 ecr 0,nop,wscale 7], length 0E..<..@.@.....f...f.....Hi.c......r.O..........>...........................10:22:15.109752 IP 192.168.102.225.webcache > centos-164.55728: Flags [S.], seq 3355074727, ack 1214886244, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 86598567 ecr 1051570889], length 0E..<T.@...W...f...f.......`.Hi.d.. .c ..............)c.>...................10:22:15.109752 IP 192.168.102.225.webcache > centos-164.55728: Flags [S.], seq 3355074727, ack 1214886244, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 86598567 ecr 1051570889], length 0E..<T.@...W...f...f.......`.Hi.d.. .c ..............)c.>...................10:22:15.109800 IP centos-164.55728 > 192.168.102.225.webcache: Flags [.], ack 1, win 229, options [nop,nop,TS val 1051570890 ecr 86598567], length 0E..4./@.@.....f...f.....Hi.d..`.....N......>....)c.................10:22:15.109804 IP centos-164.55728 > 192.168.102.225.webcache: Flags [.], ack 1, win 229, options [nop,nop,TS val 1051570890 ecr 86598567], length 0E..4./@.@.....f...f.....Hi.d..`.....N......>....)c.................10:22:15.109831 IP centos-164.55728 > 192.168.102.225.webcache: Flags [P.], seq 1:44, ack 1, win 229, options [nop,nop,TS val 1051570890 ecr 86598567], length 43: HTTP: CONNECT repo.huaweicloud.com:443 HTTP/1.0E.._.0@.@.....f...f.....Hi.d..`.....O(.....>....)c.CONNECT repo.huaweicloud.com:443 HTTP/1.0................10:22:15.109834 IP centos-164.55728 > 192.168.102.225.webcache: Flags [P.], seq 1:44, ack 1, win 229, options [nop,nop,TS val 1051570890 ecr 86598567], length 43: HTTP: CONNECT repo.huaweicloud.com:443 HTTP/1.0E.._.0@.@.....f...f.....Hi.d..`.....O(.....>....)c.CONNECT repo.huaweicloud.com:443 HTTP/1.0................10:22:15.109864 IP centos-164.55728 > 192.168.102.225.webcache: Flags [P.], seq 44:46, ack 1, win 229, options [nop,nop,TS val 1051570890 ecr 86598567], length 2: HTTPE..6.1@.@.....f...f.....Hi....`.....N......>....)c.................10:22:15.109866 IP centos-164.55728 > 192.168.102.225.webcache: Flags [P.], seq 44:46, ack 1, win 229, options [nop,nop,TS val 1051570890 ecr 86598567], length 2: HTTPE..6.1@.@.....f...f.....Hi....`.....N......>....)c.................10:22:15.110295 IP 192.168.102.225.webcache > centos-164.55728: Flags [.], ack 46, win 260, options [nop,nop,TS val 86598567 ecr 1051570890], length 0E..4T.@...W...f...f.......`.Hi..............)c.>...................10:22:15.110295 IP 192.168.102.225.webcache > centos-164.55728: Flags [.], ack 46, win 260, options [nop,nop,TS val 86598567 ecr 1051570890], length 0E..4T.@...W...f...f.......`.Hi..............)c.>...................10:22:30.125349 IP centos-164.55728 > 192.168.102.225.webcache: Flags [F.], seq 46, ack 1, win 229, options [nop,nop,TS val 1051585905 ecr 86598567], length 0E..4.2@.@.....f...f.....Hi....`.....N......>..q.)c.................10:22:30.125360 IP centos-164.55728 > 192.168.102.225.webcache: Flags [F.], seq 46, ack 1, win 229, options [nop,nop,TS val 1051585905 ecr 86598567], length 0E..4.2@.@.....f...f.....Hi....`.....N......>..q.)c.................10:22:30.125530 IP 192.168.102.225.webcache > centos-164.55728: Flags [.], ack 47, win 260, options [nop,nop,TS val 86600068 ecr 1051585905], length 0E..4[.@...PL..f...f.......`.Hi......p6......)i.>..q................10:22:30.125530 IP 192.168.102.225.webcache > centos-164.55728: Flags [.], ack 47, win 260, options [nop,nop,TS val 86600068 ecr 1051585905], length 0E..4[.@...PL..f...f.......`.Hi......p6......)i.>..q................10:22:36.124136 IP 192.168.102.225.webcache > centos-164.55728: Flags [F.], seq 1, ack 47, win 260, options [nop,nop,TS val 86600668 ecr 1051585905], length 0E..4^.@...M<..f...f.......`.Hi......m.......)k.>..q................10:22:36.124136 IP 192.168.102.225.webcache > centos-164.55728: Flags [F.], seq 1, ack 47, win 260, options [nop,nop,TS val 86600668 ecr 1051585905], length 0E..4^.@...M<..f...f.......`.Hi......m.......)k.>..q.)c.>...........10:22:36.124174 IP centos-164.55728 > 192.168.102.225.webcache: Flags [.], ack 2, win 229, options [nop,nop,TS val 1051591904 ecr 86600668], length 0E..4{.@.@.p=..f...f.....Hi....`.....V......>....)k..)c.>...........10:22:36.124177 IP centos-164.55728 > 192.168.102.225.webcache: Flags [.], ack 2, win 229, options [nop,nop,TS val 1051591904 ecr 86600668], length 0E..4{.@.@.p=..f...f.....Hi....`.....V......>....)k.................其他信息:用wget有重试操作的。[root@centos-164 portadmin]# vi ../logs/porting.log[root@centos-164 portadmin]# wget www.baidu.com--2020-02-13 10:29:04-- http://www.baidu.com/Connecting to 192.168.102.225:8080... connected.Proxy request sent, awaiting response... No data received.Retrying.--2020-02-13 10:29:26-- (try: 2) http://www.baidu.com/Connecting to 192.168.102.225:8080... connected.Proxy request sent, awaiting response... 200 OKLength: unspecified [text/html]Saving to: ‘index.html’ [ <=> ] 159,972 769KB/s in 0.2s2020-02-13 10:29:26 (769 KB/s) - ‘index.html’ saved [159972]
-
1、简介Leveldbjni提供LevelDB的JAVA接口。本文的最终目标是编译生成leveldbjni-all-1.8.jar包。2、基础环境类别子项版本获取地址(方法)华为云虚拟机KC1(920)--OSCentOS7.5Kernel4.14软件包snappy1.1.5https://github.com/google/snappy/archive/1.1.5.tar.gz leveldbV1.20https://github.com/google/leveldb/archive/v1.20.tar.gzleveldbjnimasterhttps://github.com/fusesource/leveldbjni.git 3、依赖安装Leveldbjni的编译需要maven,因此先设置好OpenJDK及maven。此处我们在centos7的容器中进行。https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz将如上链接中的两个tar包解压到固定位置,如/opt/,待后续使用。1) 拉起容器将解压位置挂载到/root,可以不用修改maven的配置文件(默认为用户HOME目录的.m2/repository),可将缓存持久化的同时,避免maven写docker读写层。bash-4.2# docker run -it -v /opt:/root --name leveldbjni centos:7bash-4.2# bash-4.2# vi /etc/profileJAVA_HOME=/root/jdk8u222-b10MAVEN_HOME=/root/apache-maven-3.5.4 PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH export MAVEN_HOME JAVA_HOME PATH bash-4.2# source /etc/profile2) snappybash-4.2# wget https://github.com/google/snappy/archive/1.1.5.tar.gz bash-4.2# tar –xzf 1.1.5.tar.gzbash-4.2# cd snappy-1.1.5bash-4.2# ./autogen.shbash-4.2# ./configure --disable-shared --with-picbash-4.2# makebash-4.2# cp .libs/libsnappy.a .bash-4.2# export SNAPPY_HOME=`pwd`3) leveldbbash-4.2# wget https://github.com/google/leveldb/archive/v1.20.tar.gzbash-4.2# tar -xzf v1.20.tar.gzbash-4.2# cd leveldb-1.20bash-4.2# wget https://github.com/google/leveldb/pull/441/commits/abb05abdbd9a92440e41a33704fba783818929d4.patchbash-4.2# wget https://github.com/google/leveldb/pull/441/commits/e521f3c4a0f92ba01a3b2a077517507c021a8cea.patchbash-4.2# patch -p1 –i abb05abdbd9a92440e41a33704fba783818929d4.patchbash-4.2# patch -p1 -i e521f3c4a0f92ba01a3b2a077517507c021a8cea.patch再依据leveldbjni中的leveldb.patch的改动,修改文件build_detect_platform。bash-4.2# makebash-4.2# cp out-static/libleveldb.a .bash-4.2# export LEVELDB_HOME=`pwd`4、组件编译安装bash-4.2# git clone https://github.com/fusesource/leveldbjni.gitbash-4.2# cd leveldbjnibash-4.2# cd ..bash-4.2# mvn -P all org.codehaus.mojo:versions-maven-plugin:1.2:set org.codehaus.mojo:versions-maven-plugin:1.2:commit -DnewVersion=1.8此步骤修改release版本号,参考https://github.com/fusesource/leveldbjni/blob/master/releasing.md bash-4.2# mvn clean install -P download -P linux64-aarch64如上的命令执行会失败,提示没有找到automake-1.14,查看环境,安装的版本为automake-1.13。[INFO] --- maven-hawtjni-plugin:1.11:build (default) @ leveldbjni-linux64-aarch64 ---[INFO] Extracting /root/leveldbjni/leveldbjni/target/leveldbjni-1.8-native-src.zip to /root/leveldbjni/leveldbjni-linux64-aarch64/target/native-build-extracted[INFO] executing: /bin/sh -c ./configure --disable-ccache --prefix=/root/leveldbjni/leveldbjni-linux64-aarch64/target/native-build/target --with-leveldb=/root/leveldb-1.20/ --with-snappy=/root/snappy-1.1.5/[INFO] executing: /bin/sh -c make install[INFO] cd . && /bin/sh /root/leveldbjni/leveldbjni-linux64-aarch64/target/native-build/autotools/missing automake-1.14 --foreign --ignore-deps Makefile[INFO] /root/leveldbjni/leveldbjni-linux64-aarch64/target/native-build/autotools/missing: line 81: automake-1.14: command not found[INFO] WARNING: 'automake-1.14' is missing on your system.[INFO] You should only need it if you modified 'Makefile.am' or[INFO] 'configure.ac' or m4 files included by 'configure.ac'.[INFO] The 'automake' program is part of the GNU Automake package:[INFO] <http://www.gnu.org/software/automake>[INFO] It also requires GNU Autoconf, GNU m4 and Perl in order to run:[INFO] <http://www.gnu.org/software/autoconf>[INFO] <http://www.gnu.org/software/m4/>[INFO] <http://www.perl.org/>[INFO] make: *** [Makefile.in] Error 127 做如下处理:bash-4.2# pushd leveldbjni/targetbash-4.2# unzip leveldbjni-1.8-native-src.zipbash-4.2# cd leveldbjni-1.8-native-src/bash-4.2# sh autogen.shbash-4.2# cp -rf . /root/leveldbjni/leveldbjni/src/main/native-package/bash-4.2# popdbash-4.2# mvn clean install -P download -P linux64-aarch64bash-4.2# pushd leveldbjni-all/bash-4.2# vi pom.xml注释掉目前不关心的架构打包,否则会导致失败(dependencies部分略) <Bundle-NativeCode> META-INF/native/windows32/leveldbjni.dll;osname=Win32;processor=x86, META-INF/native/windows64/leveldbjni.dll;osname=Win32;processor=x86-64, META-INF/native/osx/libleveldbjni.jnilib;osname=macosx;processor=x86, META-INF/native/osx/libleveldbjni.jnilib;osname=macosx;processor=x86-64, META-INF/native/linux32/libleveldbjni.so;osname=Linux;processor=x86, META-INF/native/linux64/libleveldbjni.so;osname=Linux;processor=x86-64,<!-- META-INF/native/sunos64/amd64/libleveldbjni.so;osname=SunOS;processor=x86-64, META-INF/native/sunos64/sparcv9/libleveldbjni.so;osname=SunOS;processor=sparcv9, META-INF/native/freebsd64/libleveldbjni.so;osname=FreeBSD;processor=x86-64, META-INF/native/linux64/ppc64le/libleveldbjni.so;osname=Linux;processor=ppc64le,--> META-INF/native/linux64/aarch64/libleveldbjni.so;osname=Linux;processor=aarch64 </Bundle-NativeCode>bash-4.2# mvn clean package -P download -P all5、系统配置 无6、测试bash-4.2# cd leveldbjni-all/target/bash-4.2# unzip leveldbjni-all-1.8.jarbash-4.2# find META-INF/native/META-INF/native/META-INF/native/linux64META-INF/native/linux64/libleveldbjni.soMETA-INF/native/linux64/aarch64META-INF/native/linux64/aarch64/libleveldbjni.soMETA-INF/native/windows64META-INF/native/windows64/leveldbjni.dllMETA-INF/native/linux32META-INF/native/linux32/libleveldbjni.soMETA-INF/native/windows32META-INF/native/windows32/leveldbjni.dllMETA-INF/native/osxMETA-INF/native/osx/libleveldbjni.jnilibbash-4.2# ldd META-INF/native/linux64/aarch64/libleveldbjni.so ldd: warning: you do not have execution permission for `META-INF/native/linux64/aarch64/libleveldbjni.so' linux-vdso.so.1 => (0x0000ffffa9870000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x0000ffffa96a0000) libm.so.6 => /lib64/libm.so.6 (0x0000ffffa95e0000) libc.so.6 => /lib64/libc.so.6 (0x0000ffffa9450000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000ffffa9410000) /lib/ld-linux-aarch64.so.1 (0x0000ffffa9880000)编译的so中不包含snappy等第三方动态库。7、参考信息https://github.com/fusesource/leveldbjni8、FAQ无
-
在编辑maven工程时,发现如下2个jar包不可用。https://mirrors.huaweicloud.com/repository/maven/org/apache/hadoop/hadoop-mapreduce-client-jobclient/2.7.3.2.6.3.0-235/hadoop-mapreduce-client-jobclient-2.7.3.2.6.3.0-235-tests.jarhttps://mirrors.huaweicloud.com/repository/maven/org/apache/hadoop/hadoop-hdfs/2.7.3.2.6.3.0-235/hadoop-hdfs-2.7.3.2.6.3.0-235-tests.jar用IE打开也无法下载。用IE打开上一级目录,可以看到这2个文件名,但点击也无法下载。请处理。
上滑加载中
推荐直播
-
华为AI技术发展与挑战:集成需求分析的实战指南
2024/11/26 周二 18:20-20:20
Alex 华为云学堂技术讲师
本期直播将综合讨论华为AI技术的发展现状,技术挑战,并深入探讨华为AI应用开发过程中的需求分析过程,从理论到实践帮助开发者快速掌握华为AI应用集成需求的框架和方法。
去报名 -
华为云DataArts+DWS助力企业数据治理一站式解决方案及应用实践
2024/11/27 周三 16:30-18:00
Walter.chi 华为云数据治理DTSE技术布道师
想知道数据治理项目中,数据主题域如何合理划分?数据标准及主数据标准如何制定?数仓分层模型如何合理规划?华为云DataArts+DWS助力企业数据治理项目一站式解决方案和应用实践告诉您答案!本期将从数据趋势、数据治理方案、数据治理规划及落地,案例分享四个方面来助力企业数据治理项目合理咨询规划及顺利实施。
去报名
热门标签