-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for arm64 #3681
Add support for arm64 #3681
Conversation
7929099
to
6ddc282
Compare
See #1861 (comment) for details on how to compile out Luajit for arm64 builds. The bigger issue is that rules_go does not yet support arm64 / aarch64. See https://github.com/moderation/rules_go/commit/b6ce43d0e7fd58eba01d992140a685cc2775cde4 for a possible fix. Lastly the protoc-gen-validate (PGV) dependency won't compile on arm64 / aarch64 either - bufbuild/protoc-gen-validate#75 With your changes @lubinsz, are you able to successfully compile on arm64? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution. Please update the PR title and description to be clear this is about LuaJIT. Also please clean up the description template. Thanks!
ci/do_ci.sh
Outdated
@@ -55,6 +55,7 @@ if [[ "$1" == "bazel.release" ]]; then | |||
echo "bazel release build with tests..." | |||
bazel_release_binary_build | |||
echo "Testing..." | |||
bazel clean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these cleans necessary?
@@ -2,7 +2,7 @@ | |||
|
|||
set -e | |||
|
|||
VERSION=2.0.5 | |||
VERSION=2.1.0-beta3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't personally have an objection to upgrading to 2.1, but worth a discussion if anyone else cares about this.
@moderation Please see logs with my bazel@arm64 as reference: Log 1: bazel-bin/source/exe/envoy-static: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[md5/uuid]=99c6fad8c346d5c71439f57b0208de26, not stripped Log 2, Log 3, root@bin:/go/src/github.com/envoyproxy/envoy# bazel build //source/exe:envoy-static |
Signed-off-by: Bin Lu <[email protected]>
It would be great if you could share your patches. I've been trying and failing to compile with a mixture of Bazel fixes from https://zhiyisun.github.io/2017/02/15/Running-Google-Machine-Learning-Library-Tensorflow-On-ARM-64-bit-Platform.html, my patch to rules_go at https://github.com/moderation/rules_go/commit/b6ce43d0e7fd58eba01d992140a685cc2775cde4 |
@moderation
bazel fetch //source/... |
@lubinsz Amazing! These patches are working for me. I applied the Bazel changes to 0.15.0 that was released this morning. I compiled out Lua altogether and didn't include your patches. I applied the Envoy patches to master. Success! Thanks for this. It would be great to get the Bazel changes accepted upstream - do you plan on submitting a PR? Similarly it would be good to get the rules_go changes accepted as well. |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
The CI is failing in "coverage" at INFO: From ProtoCompile external/envoy_api/envoy/service/discovery/v2/hds.pb.cc: and at "asan" at bazel-out/k8-dbg/genfiles/external/com_google_protobuf/src: warning: directory does not exist. @mattklein123 can you take a look at the failing CI tests and suggest a next course of action? |
Merge master and see if it fixes itself. Beyond that, I'm not sure and I would see if you can repro locally within docker. |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
@moderation @lubinsz please take a look |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
@lubinsz wondering where we are with ARM support? I've heard from some folks interested in this, any chance we can land the required PRs? |
I'm compiling on arm64 and just set up a new Pine64 Rockpro64 (6 core) system. I'm using the latest Bazel 0.16.0. The patches to Bazel have changed a bit since @lubinsz posted the original patch. The discrepancy between Go using the term
With Cloudflare moving a lot of their stack to ARM and reducing their use of NGINX (https://twitter.com/eastdakota/status/1024515150546493440), you'd think they would be a perfect candidate. |
There is a PR to support arm64 for rules_go at bazel-contrib/rules_go#1550. Has a dependency on a massive closed Bazel PR. Looks like they are targeting for Bazel 0.17.0 |
Thanks for these updates @moderation I was trying to get a build done with the steps in #3681 (comment) but did not work. Any chance you have a gist of the steps you are using to get a working build? Since Bazel 0.16 was just released, maybe it will be a little while till that other work is available. |
@ptone take a look at https://gitlab.com/snippets/1742074. The delay was testing backing our the |
Thanks @moderation I have now gotten farther, with less patched lines, but still haven't won in this latest round. I had a couple other issues I may have solved (which may have broken something else) I had to remove luajit as external dep I was getting bizarre errors about a output fcolor-diagnostics flag: In the end, the fatal error seemed to related to files that were on disk, but had something wrong about the way they were referenced. My build context is on a roc-rk3328 system running armbian distro |
@ptone I mentioned compiling out Lua above but omitted it from the snippet. I've updated the snippet now to include that detail. I also link to my minimal |
@moderation @ptone @vielmetti @mattklein123 |
@moderation @ptone @vielmetti @mattklein123 |
4 similar comments
@moderation @ptone @vielmetti @mattklein123 |
@moderation @ptone @vielmetti @mattklein123 |
@moderation @ptone @vielmetti @mattklein123 |
@moderation @ptone @vielmetti @mattklein123 |
Signed-off-by: Bin Lu [email protected]
LuaJIT2.0 does not support for Arm64
Luajit 2.0.5 doesn't support Arm64, please see logs as reference.
So I need to update it into the latest version.
Logs:
bazel fetch //source/...
….
==== Building LuaJIT 2.0.5 ====
make -C src
make[2]: Entering directory '/root/.cache/bazel/_bazel_root/38a3de7f29554e17d452de52137c58b9/external/envoy_deps_cache_2c744dffd279d7e9e0910ce594eb4f4f/luajit.dep.build/LuaJIT-2.0.5/src'
lj_arch.h:55:2: error: #error "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
^
Risk Level: Medium
Testing: unit test,integration
Docs Changes: None
Release Notes: None