Skip to content

PHOENIX-6475 Use org.openlabtesting.protobuf:protoc when building on Linux ARM64 - #1238

Closed
martin-g wants to merge 1 commit into
apache:masterfrom
martin-g:fix-build-on-arm64
Closed

PHOENIX-6475 Use org.openlabtesting.protobuf:protoc when building on Linux ARM64#1238
martin-g wants to merge 1 commit into
apache:masterfrom
martin-g:fix-build-on-arm64

Conversation

@martin-g

Copy link
Copy Markdown
Member

Stock Protobuf-Java adds aarch64 protoc binary in 3.5.0.
To be able to build on Linux ARM64 with Protobuf 2.x we should use https://github.com/os72/protoc-jar:2.6.1+

Comment threadphoenix-pherf/pom.xml
Comment threadpom.xml Outdated
<protobuf-java.version>2.5.0</protobuf-java.version>
<!-- com.google repo will be used except on Aarch64 platform. -->
<protobuf.group>com.google.protobuf</protobuf.group>
<protobuf-java.version>2.6.1</protobuf-java.version>

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated to 2.6.1 to keep the x86_64 and aarch64 versions in sync.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted to 2.5.0 for both x86_64 and aarch64!
The OpenLabTesting guys released 2.5.0.2 which brings statically linked Protoc.
Here is its build script: https://gist.github.com/liusheng/64aee1b27de037f8b9ccf1873b82c413

@stotystoty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch changes too much, and we specifically want to use the exact same version (2.5.0) that HBase and Hadoop does.

Please use https://repo1.maven.org/maven2/org/openlabtesting/protobuf/protoc/2.5.0/ for the aarch64 protoc binary,
and only override only the groupId used by the protobuf maven plugin from the profile.

Comment threadphoenix-pherf/pom.xml
@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec6m 20sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep5m 0sMaven dependency ordering for branch
+1 💚mvninstall10m 50smaster passed
+0hbaserecompile22m 11sHBase recompiled.
+1 💚compile1m 30smaster passed
+1 💚javadoc2m 31smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 19sMaven dependency ordering for patch
+1 💚mvninstall8m 11sthe patch passed
+0hbaserecompile14m 51sHBase recompiled.
+1 💚compile1m 32sthe patch passed
+1 💚javac1m 32sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 4sThe patch has no ill-formed XML file.
+1 💚javadoc2m 31sthe patch passed
_ Other Tests _
-1 ❌unit114m 47sroot in the patch failed.
-1 ❌asflicense2m 9sThe patch generated 614 ASF License warnings.
171m 45s
ReasonTests
Failed junit testsphoenix.end2end.PhoenixTTLToolIT
phoenix.end2end.IndexBuildTimestampIT
phoenix.end2end.IndexVerificationOldDesignIT
phoenix.end2end.IndexRepairRegionScannerIT
phoenix.end2end.IndexExtendedIT
phoenix.end2end.index.GlobalIndexCheckerIT
phoenix.end2end.ConcurrentMutationsExtendedIT
phoenix.end2end.IndexToolForPartialBuildIT
phoenix.end2end.IndexRebuildTaskIT
phoenix.end2end.index.IndexMetadataIT
phoenix.end2end.index.ViewIndexIT
phoenix.end2end.IndexToolForPartialBuildWithNamespaceEnabledIT
phoenix.end2end.CsvBulkLoadToolIT
phoenix.end2end.IndexToolTimeRangeIT
phoenix.end2end.LogicalTableNameExtendedIT
phoenix.end2end.LogicalTableNameIT
phoenix.schema.stats.NamespaceDisabledStatsCollectorIT
phoenix.end2end.ConcurrentUpsertsWithoutIndexedColsIT
phoenix.schema.stats.NamespaceEnabledStatsCollectorIT
phoenix.end2end.BackwardCompatibilityIT
phoenix.end2end.IndexToolIT
phoenix.end2end.IndexScrutinyToolIT
phoenix.end2end.IndexToolForNonTxGlobalIndexIT
phoenix.end2end.IndexToolForDeleteBeforeRebuildIT
phoenix.end2end.IndexScrutinyToolForTenantIT
phoenix.end2end.RegexBulkLoadToolIT
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1238
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux 23641dc7f3f2 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 3231aad
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/1/artifact/yetus-general-check/output/patch-unit-root.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/1/testReport/
asflicensehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/1/artifact/yetus-general-check/output/patch-asflicense-problems.txt
Max. process+thread count11223 (vs. ulimit of 30000)
modulesC: phoenix-core phoenix-pherf . U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/1/console
versionsgit=2.7.4 maven=3.3.9
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@martin-g

martin-g commented May 26, 2021

Copy link
Copy Markdown
MemberAuthor

Please use https://repo1.maven.org/maven2/org/openlabtesting/protobuf/protoc/2.5.0/ for the aarch64 protoc binary,

I've tried it before choosing os72 but it didn't work because:

  1. ${user.home}/.m2/repository/org/openlabtesting/protobuf/protoc/${protobuf-java.version}/protoc-${protobuf-java.version}-${os.detected.classifier}.exe has no executable bit
Caused by: java.io.IOException: Cannot run program "/home/ubuntu/.m2/repository/org/openlabtesting/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe": error=13, Permission denied
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1048)
at java.lang.Runtime.exec (Runtime.java:621)
at org.codehaus.plexus.util.cli.Commandline.execute (Commandline.java:660)
at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLineAsCallable (CommandLineUtils.java:136)
at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine (CommandLineUtils.java:106)
at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine (CommandLineUtils.java:89)
at org.xolstice.maven.plugin.protobuf.Protoc.execute (Protoc.java:242)
...
  1. After "chmod +x ..." it started failing with:
[INFO] --- protobuf-maven-plugin:0.6.1:compile (compile-protoc) @ phoenix-core ---
[INFO] Compiling 10 proto file(s) to /home/ubuntu/git/apache/phoenix/phoenix-core/target/generated-sources/protobuf/java
[ERROR] PROTOC FAILED: /home/ubuntu/.m2/repository/org/openlabtesting/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory
[ERROR] /home/ubuntu/git/apache/phoenix/phoenix-core/src/main/protobuf/PGuidePosts.proto [0:0]: /home/ubuntu/.m2/repository/org/openlabtesting/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory
[ERROR] /home/ubuntu/git/apache/phoenix/phoenix-core/src/main/protobuf/ServerCacheFactory.proto [0:0]: /home/ubuntu/.m2/repository/org/openlabtesting/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory
...

i.e. the executable is dynamically linked

file /home/ubuntu/.m2/repository/org/openlabtesting/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
/home/ubuntu/.m2/repository/org/openlabtesting/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=ad7c0941f0121611ef1963de1bf6d699e2517c5f, with debug_info, not stripped

and nothing provides libprotoc.so.8 in the LD_LIBRARY_PATH.

I will contact the OpenLab Testing guys and see whether they can release 2.5.0.1 with statically linked executable!

@stoty

stoty commented May 26, 2021

Copy link
Copy Markdown
Contributor

Thanks for the explanation and your work on it.

I was suggesting the Openlabtesting version because HBase use(d) that one, and it had 2.5.0 available for arm.

However, if that one has dependency problems, then of course it is not useful for us.

I can see two solutions:

  1. You can abandon this change, and specify the compiled ARM protoc binary location in a system property on the maven command line when building.

  2. Use the (only ?) known working os72 2.6.1 version of protoc in the aarch64 profile.
    However, in this case please do not change the x86_64 protobuf artifact for 2.5.0, nor the java library versions, only the protoc artifact groupId and version, and only for the arm profile.
    (You'll still need to extract the version and groupId into properties of course)

If you choose 2.) please also add a comment to the profile that we're using 2.6.x here because there is no public 2.5.0 artifact for arm available.

…Linux ARM64
Stock Protobuf-Java adds aarch64 protoc binary in 3.5.0.
To be able to build on Linux ARM64 with Protobuf 2.x we should use https://github.com/theopenlab/protobuf

@stotystoty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 I lack the hardware to test this, but LGTM

@martin-g

martin-g commented May 26, 2021

Copy link
Copy Markdown
MemberAuthor

@stoty about hardware to test it: few other Hadoop related projects use Linux ARM64 Jenkins agents. See https://ci-hadoop.apache.org/computer/ and look for arm.
Are you interested to test Phoenix on these too ?

@martin-gmartin-g changed the title PHOENIX-6475 Use github.com/os72/protoc-jar when building on Linux ARM64PHOENIX-6475 Use org.openlabtesting.protobuf:protoc when building on Linux ARM64May 26, 2021
@stoty

Copy link
Copy Markdown
Contributor

In theory it'd be nice to test on ARM, but it's not enough of a priority at the moment to put in the work to set up the tests and maintain them.

@martin-g

Copy link
Copy Markdown
MemberAuthor

I could offer my help doing the extra work and maintenance!
Since Phoenix is mainly Java based I don't expect much work related to ARM64. But having CI to notify us when there is a regression would be nice!

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 6sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep5m 9sMaven dependency ordering for branch
+1 💚mvninstall11m 8smaster passed
+0hbaserecompile23m 28sHBase recompiled.
+1 💚compile1m 33smaster passed
+1 💚javadoc2m 12smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 17sMaven dependency ordering for patch
+1 💚mvninstall8m 3sthe patch passed
+0hbaserecompile14m 29sHBase recompiled.
+1 💚compile1m 29sthe patch passed
+1 💚javac1m 29sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 3sThe patch has no ill-formed XML file.
+1 💚javadoc2m 13sthe patch passed
_ Other Tests _
-1 ❌unit118m 31sroot in the patch failed.
-1 ❌asflicense2m 18sThe patch generated 614 ASF License warnings.
170m 51s
ReasonTests
Failed junit testsphoenix.end2end.AuditLoggingIT
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1238
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux bbf39ec11ce4 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 3231aad
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/2/artifact/yetus-general-check/output/patch-unit-root.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/2/testReport/
asflicensehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/2/artifact/yetus-general-check/output/patch-asflicense-problems.txt
Max. process+thread count11587 (vs. ulimit of 30000)
modulesC: phoenix-core . U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/2/console
versionsgit=2.7.4 maven=3.3.9
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec7m 3sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep5m 1sMaven dependency ordering for branch
+1 💚mvninstall13m 11smaster passed
+0hbaserecompile25m 20sHBase recompiled.
+1 💚compile1m 44smaster passed
+1 💚javadoc2m 31smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 20sMaven dependency ordering for patch
+1 💚mvninstall10m 16sthe patch passed
+0hbaserecompile17m 45sHBase recompiled.
+1 💚compile1m 37sthe patch passed
+1 💚javac1m 37sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 2sThe patch has no ill-formed XML file.
+1 💚javadoc2m 44sthe patch passed
_ Other Tests _
-1 ❌unit137m 16sroot in the patch failed.
-1 ❌asflicense1m 40sThe patch generated 614 ASF License warnings.
201m 1s
ReasonTests
Failed junit testsphoenix.end2end.BackwardCompatibilityIT
phoenix.end2end.AuditLoggingIT
phoenix.end2end.UpsertSelectIT
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1238
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux 36b2dbc588e9 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 3231aad
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/3/artifact/yetus-general-check/output/patch-unit-root.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/3/testReport/
asflicensehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/3/artifact/yetus-general-check/output/patch-asflicense-problems.txt
Max. process+thread count7635 (vs. ulimit of 30000)
modulesC: phoenix-core . U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1238/3/console
versionsgit=2.7.4 maven=3.3.9
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stotystoty closed this May 27, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@martin-g@stoty