Skip to content
Permalink
Browse files
BIGTOP-3677. Building HBase for CentOS 7 on arm64 and ppc64le fails d…
…ue to missing libraries. (#896)

* BIGTOP-3677. Building HBase for CentOS 7 on arm64 fails due to missing libraries.

* needs the fix for ppc64le too.

* bumped the version of protobuf used for HBase on ppc64le.
  • Loading branch information
iwasakims committed Apr 30, 2022
1 parent a21926d commit 8ab9971866e40f35cac19bd9c7a3aad76127bbe8
Showing 3 changed files with 20 additions and 88 deletions.
@@ -20,6 +20,14 @@ set -ex

export MAVEN_OPTS="-Xmx1024m"

MVN_ARGS="-Phadoop-3.0 "
MVN_ARGS+="-Dhadoop-three.version=${HADOOP_VERSION} "
MVN_ARGS+="-Dhadoop.guava.version=27.0-jre "
MVN_ARGS+="-Djetty.version=9.3.29.v20201019 "
MVN_ARGS+="-Dzookeeper.version=${ZOOKEEPER_VERSION} "
MVN_ARGS+="-DskipTests "
MVN_ARGS+="-Dcheckstyle.skip=true "

if [ "${BIGTOP_JDK:=8}" == "8" ]; then
MAVEN_ADDITIONAL="-Dadditionalparam=-Xdoclint:none"
fi
@@ -30,8 +38,9 @@ if [ $HOSTTYPE = "powerpc64le" ] ; then
sed -i 's|<jruby.version>.*</jruby.version>|<jruby.version>1.7.23</jruby.version>|' pom.xml
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 \
-Dclassifier=linux-ppcle_64 -Dpackaging=exe -Dfile=/usr/local/bin/protoc
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 \
-Dclassifier=linux-ppcle_64 -Dpackaging=exe -Dfile=/usr/local/protobuf-3.5.1.1/bin/protoc
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.17.3 \
-Dclassifier=linux-ppcle_64 -Dpackaging=exe -Dfile=/usr/local/protobuf-3.17.3/bin/protoc
MVN_ARGS+="-Dexternal.protobuf.groupid=com.google.protobuf -Dexternal.protoc.version=2.5.0 "
fi

if [ $HOSTTYPE = "aarch64" ] ; then
@@ -43,16 +52,9 @@ if [ $HOSTTYPE = "aarch64" ] ; then
'\ <\/dependency>' pom.xml
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 \
-Dclassifier=linux-aarch_64 -Dpackaging=exe -Dfile=/usr/local/bin/protoc
MVN_ARGS+="-Dexternal.protobuf.groupid=com.google.protobuf -Dexternal.protoc.version=2.5.0 "
fi

MVN_ARGS="-Phadoop-3.0 "
MVN_ARGS+="-Dhadoop-three.version=${HADOOP_VERSION} "
MVN_ARGS+="-Dhadoop.guava.version=27.0-jre "
MVN_ARGS+="-Djetty.version=9.3.29.v20201019 "
MVN_ARGS+="-Dzookeeper.version=${ZOOKEEPER_VERSION} "
MVN_ARGS+="-DskipTests "
MVN_ARGS+="-Dcheckstyle.skip=true "

# HBASE-21513: separate site and assembly:single to avoid assembly issues.
mvn ${MVN_ARGS} ${MAVEN_ADDITIONAL} clean install "$@"
mvn ${MVN_ARGS} ${MAVEN_ADDITIONAL} site "$@"

This file was deleted.

@@ -54,22 +54,17 @@
}

if ($architecture == 'ppc64le') {
exec { "download protobuf 3.5.1.1":
exec { "download protobuf 3.17.3":
cwd => "/usr/src",
command => "/usr/bin/wget https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.5.1.1.tar.gz && mkdir -p protobuf-3.5.1.1 && /bin/tar -xvzf v3.5.1.1.tar.gz -C protobuf-3.5.1.1 --strip-components=1",
creates => "/usr/src/protobuf-3.5.1.1",
command => "/usr/bin/wget https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.17.3.tar.gz && mkdir -p protobuf-3.17.3 && /bin/tar -xvzf v3.17.3.tar.gz -C protobuf-3.17.3 --strip-components=1",
creates => "/usr/src/protobuf-3.17.3",
}

file { "/usr/src/protobuf-3.5.1.1/protoc-3.5.1-add-support-for-ppc64le.patch":
source => "puppet:///modules/bigtop_toolchain/protoc-3.5.1-add-support-for-ppc64le.patch",
require => Exec["download protobuf 3.5.1.1"],
}

exec { "install protobuf 3.5.1.1":
cwd => "/usr/src/protobuf-3.5.1.1",
command => "/usr/bin/patch -p1 < protoc-3.5.1-add-support-for-ppc64le.patch && /usr/src/protobuf-3.5.1.1/autogen.sh && /usr/src/protobuf-3.5.1.1/configure --prefix=/usr/local/protobuf-3.5.1.1 --disable-shared --with-pic && /usr/bin/make install",
creates => "/usr/local/protobuf-3.5.1.1",
require => File["/usr/src/protobuf-3.5.1.1/protoc-3.5.1-add-support-for-ppc64le.patch"],
exec { "install protobuf 3.17.3":
cwd => "/usr/src/protobuf-3.17.3",
command => "/usr/src/protobuf-3.17.3/autogen.sh && /usr/src/protobuf-3.17.3/configure --prefix=/usr/local/protobuf-3.17.3 --disable-shared --with-pic && /usr/bin/make install",
creates => "/usr/local/protobuf-3.17.3",
require => Exec["download protobuf 3.17.3"],
timeout => 3000
}
}

0 comments on commit 8ab9971

Please sign in to comment.