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
Go branch does not build on arm64 #5178
Comments
This is because the bazel in your host and that in the gvisor builder image are in different version.
|
@zhlhahaha thanks , I only git check out remotes/origin/go gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables../pkg/sentry/platform/ring0/pagetables/walker_empty.go:121:14: pudEntry.SetSuper undefined (type *PTE has no field or method SetSuper) root@cloud:~/gvisor/runsc# go version |
Ok, I do not support this branch now. Maybe you can try |
@zhlhahaha which bazel verison do you use? root@cloud:/gvisor# ~/bazel/bazel-3.7.2-linux-arm64 version |
bazel versionBuild label: 3.7.1- (@non-git) |
@zhlhahaha @prattmic when I execute bazel build runsc ,another problem happens Use --sandbox_debug to see verbose messages from the sandbox builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix linux_arm64 -src runsc/cmd/boot.go -src runsc/cmd/capability.go -src runsc/cmd/checkpoint.go -src ... (remaining 119 argument(s) skipped) root@cloud:/gvisor# bazel version bazel build runsc Use --sandbox_debug to see verbose messages from the sandbox builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix linux_arm64 -src runsc/cmd/boot.go -src runsc/cmd/capability.go -src runsc/cmd/checkpoint.go -src ... (remaining 119 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox |
This will need a bit of thought. The specific pagetables problem that you have hit is relatively easy to fix. (We can produce templates for both architectures and preserve the relevant tags.) The other, more complex case, is the VDSO. This is a cc target that is generated, and then embedded in go code. E.g.: Conceivable we could build and tag this as well, but there are now complications with cross-complication (and GitHub does not have ARM runners by default). I'll leave this open, but it may take a while to resolve. In the meantime, I recommend just building for ARM on the master branch. We're trying to improve support & continuous integration for ARM, so hopefully if this process isn't friction-free it will be soon. |
@amscanne Have you runned in arm64? bazel build runsc |
This requires several changes: * Templates must preserve relevant tags. * Pagetables templates are split into two targets, each preserving tags. * The binary VDSO is similarly split into two targets, with some juggling. * The top level tools/go_branch.sh now does a crossbuild of ARM64 as well, and checks and merges the results of the two branches together. Fixes #5178 PiperOrigin-RevId: 350795706
@amscanne has a fix for the go branch: #5229. It will be merged soon.
I think something is wrong with your enviroment. I recommend to build runsc in a docker container to avoid this sort of problems. You can run "make runsc" on ARM64 host or you can run "make BAZEL_OPTIONS=--config=cross-aarch64 runsc" on x86 host. |
@amscanne thank you, when will you be able to merge it ? by that time I can rebuild the gvisor |
I've confirmed that this is now working as expected. Please reopen if there are still any issues. |
@amscanne the issues are stilll exist. git fetch --all
bazel build runsc Use --sandbox_debug to see verbose messages from the sandbox builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix linux_arm64 -src runsc/cmd/boot.go -src runsc/cmd/capability.go -src runsc/cmd/checkpoint.go -src ... (remaining 119 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox |
Can you try
|
@zhlhahaha |
Sorry, it works fine on my server and I can not reproduce your error. Maybe you can checkout to origin/go branch and use go build. I just checked. It works fine on Arm now. |
@zhlhahaha which bazel version you use? |
bazel version |
@zhlhahaha with go build . which go version you use? |
go version go1.15.5 linux/arm64 |
I am a bit confused. For clarity: let's keep this issue to the Go branch. Is that working as expected? If there are bazel issues separately, can we open up a separate issue? |
@amscanne @zhlhahaha thanks. now, I can build the runsc successfully. root@cloud:/gvisor# docker run --runtime=runsc -it ubuntu /bin/bash |
Description
gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables
../pkg/sentry/platform/ring0/pagetables/walker_empty.go:121:14: pudEntry.SetSuper undefined (type *PTE has no field or method SetSuper)
../pkg/sentry/platform/ring0/pagetables/walker_empty.go:132:22: pudEntry.IsSuper undefined (type *PTE has no field or method IsSuper)
../pkg/sentry/platform/ring0/pagetables/walker_empty.go:138:24: pmdEntries[index].SetSuper undefined (type PTE has no field or method SetSuper)
../pkg/sentry/platform/ring0/pagetables/walker_empty.go:175:15: pmdEntry.SetSuper undefined (type *PTE has no field or method SetSuper)
../pkg/sentry/platform/ring0/pagetables/walker_empty.go:186:23: pmdEntry.IsSuper undefined (type *PTE has no field or method IsSuper)
../pkg/sentry/platform/ring0/pagetables/walker_lookup.go:121:14: pudEntry.SetSuper undefined (type *PTE has no field or method SetSuper)
../pkg/sentry/platform/ring0/pagetables/walker_lookup.go:132:22: pudEntry.IsSuper undefined (type *PTE has no field or method IsSuper)
../pkg/sentry/platform/ring0/pagetables/walker_lookup.go:138:24: pmdEntries[index].SetSuper undefined (type PTE has no field or method SetSuper)
../pkg/sentry/platform/ring0/pagetables/walker_lookup.go:175:15: pmdEntry.SetSuper undefined (type *PTE has no field or method SetSuper)
../pkg/sentry/platform/ring0/pagetables/walker_lookup.go:186:23: pmdEntry.IsSuper undefined (type *PTE has no field or method IsSuper)
../pkg/sentry/platform/ring0/pagetables/walker_lookup.go:186:23: too many errors
Steps to reproduce
make runsc
Environment
root@cloud:
/gvisor/runsc# go version/gvisor/runsc# uname -ago version go1.15 linux/arm64
root@cloud:
Linux cloud 5.5.19-050519-generic #202004210831 SMP Tue Apr 21 08:49:56 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
root@cloud:~/gvisor/runsc#
The text was updated successfully, but these errors were encountered: