[ https://issues.apache.org/jira/browse/HBASE-19146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16233743#comment-16233743 ]
Yuqi Gu edited comment on HBASE-19146 at 11/1/17 7:38 AM: ---------------------------------------------------------- I fix it by installing two protocbuf version(2.5.0/3.3.0) on host. The protocbuf 2.5.0 is installed in "/usr/bin/protoc "for "external.protobuf.version". And 3.3.0 is in "/usr/local/bin/protoc" for " internal.protobuf.version ". So, the patch is like as follows: SRC_HOME/pom.xml; {code:java} <artifactId>protobuf-maven-plugin</artifactId> <version>${protobuf.plugin.version}</version> <configuration> - <protocArtifact>com.google.protobuf:protoc:${external.protobuf.version}:exe:${os.detected.classifier}</protocArtifact> + <protocExecutable>/usr/local/bin/protoc</protocExecutable> <protoSourceRoot>${basedir}/src/main/protobuf/</protoSourceRoot> <clearOutputDirectory>false</clearOutputDirectory> {code} SRC_HOME/hbase-protocol-shaded/pom.xml {code:java} <goal>compile</goal> </goals> <configuration> - <protocArtifact>com.google.protobuf:protoc:${internal.protobuf.version}:exe:${os.detected.classifier}</protocArtifact> + <protocExecutable>/usr/local/bin/protoc</protocExecutable> <attachProtoSources>false</attachProtoSources> <checkStaleness>true</checkStaleness> </configuration> {code} Obviously, it is a workaround to build hbase on AARCH64. Any other way to fix it? was (Author: yqgu): I fix it by installing two protocbuf version(2.5.0/3.3.0) on host. protocbuf 2.5.0 is installed in "/usr/bin/protoc "for "external.protobuf.version". And 3.3.0 is in "/usr/local/bin/protoc" for " internal.protobuf.version ". So, the patch is like as follows: SRC_HOME/pom.xml; {code:java} <artifactId>protobuf-maven-plugin</artifactId> <version>${protobuf.plugin.version}</version> <configuration> - <protocArtifact>com.google.protobuf:protoc:${external.protobuf.version}:exe:${os.detected.classifier}</protocArtifact> + <protocExecutable>/usr/local/bin/protoc</protocExecutable> <protoSourceRoot>${basedir}/src/main/protobuf/</protoSourceRoot> <clearOutputDirectory>false</clearOutputDirectory> {code} SRC_HOME/hbase-protocol-shaded/pom.xml {code:java} <goal>compile</goal> </goals> <configuration> - <protocArtifact>com.google.protobuf:protoc:${internal.protobuf.version}:exe:${os.detected.classifier}</protocArtifact> + <protocExecutable>/usr/local/bin/protoc</protocExecutable> <attachProtoSources>false</attachProtoSources> <checkStaleness>true</checkStaleness> </configuration> {code} Obviously, it is a workaround to build hbase on AARCH64. Any other way to fix it? > Hbase3.0 protobuf-maven-plugin do not support Arm64(only for x86) > ------------------------------------------------------------------ > > Key: HBASE-19146 > URL: https://issues.apache.org/jira/browse/HBASE-19146 > Project: HBase > Issue Type: Bug > Components: build, pom > Affects Versions: 3.0.0 > Environment: OS: Ubuntu 16.04.3 > OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) > Hw platform: AARCH64 > Reporter: Yuqi Gu > Priority: Major > > We are building the HBase 3.0.0-SNAPSHOT on AARCH64. > It is noted that 'protobuf-maven-plugin' only support x86 shown as follows: > {code:java} > <plugin> > <groupId>org.xolstice.maven.plugins</groupId> > <artifactId>protobuf-maven-plugin</artifactId> > <version>${protobuf.plugin.version}</version> > <configuration> > <protocArtifact>com.google.protobuf:protoc:${external.protobuf.version}: > exe:${os.detected.classifier}</protocArtifact> > > <protocArtifact>com.google.protobuf:protoc:${external.protobuf.version}:exe:${os.detected.classifier}</protocArtifact> > > <clearOutputDirectory>false</clearOutputDirectory> > <checkStaleness>true</checkStaleness> > </configuration> > </plugin> > {code} > So the build is failed. > {code:java} > [INFO] --- protobuf-maven-plugin:0.5.0:compile (compile-protoc) @ > hbase-protocol-shaded --- > [INFO] Compiling 32 proto file(s) to > /root/hbase/hbase-protocol-shaded/target/generated-sources/protobuf/java > Failed to execute goal > org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile > (compile-protoc) on project hbase-protocol-shaded: Missing: > {code} > Then I installed aarch64 protobuf 2.5.0 on the host and modify the pom: > {code:java} > - <protoSourceRoot>${basedir}/src/main/protobuf/</protoSourceRoot> > + <protocExecutable>/usr/local/bin/protoc</protocExecutable> > {code} > The build is also failed: > {code:java} > [INFO] Compiling 32 proto file(s) to > /root/hbase/hbase-protocol-shaded/target/generated-sources/protobuf/java > [ERROR] PROTOC FAILED: google/protobuf/any.proto:31:10: Unrecognized syntax > identifier "proto3". This parser only recognizes "proto2". > {code} > It seems that "internal.protobuf.version" in "hbase-protocol-shaded" is 3.3.0. > How to fix it? Thanks! > -- This message was sent by Atlassian JIRA (v6.4.14#64029)