Skip to content
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

Closed
magnate3 opened this issue Dec 29, 2020 · 21 comments · Fixed by #5229
Closed

Go branch does not build on arm64 #5178

magnate3 opened this issue Dec 29, 2020 · 21 comments · Fixed by #5229
Assignees
Labels
type: bug Something isn't working

Comments

@magnate3
Copy link

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
go version go1.15 linux/arm64
root@cloud:
/gvisor/runsc# uname -a
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#

@magnate3 magnate3 added the type: bug Something isn't working label Dec 29, 2020
@zhlhahaha
Copy link
Contributor

Environment

root@cloud:/gvisor/runsc# go version go version go1.15 linux/arm64 root@cloud:/gvisor/runsc# uname -a
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#

This is because the bazel in your host and that in the gvisor builder image are in different version.
You can try following steps:

# cd gvisor
# bazel clean
# rm -rf /root/.cache/bazel/_bazel_root
# make runsc

@magnate3
Copy link
Author

magnate3 commented Jan 4, 2021

@zhlhahaha thanks , I only git check out remotes/origin/go
the steps is as following:
root@cloud:/gvisor# ls
AUTHORS go.mod go.sum LICENSE pkg README.md runsc shim webhook
root@cloud:
/gvisor# cd runsc/
root@cloud:~/gvisor/runsc# go build

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
root@cloud:~/gvisor/runsc#

root@cloud:~/gvisor/runsc# go version
go version go1.15 linux/arm64

@zhlhahaha
Copy link
Contributor

@zhlhahaha thanks , I only git check out remotes/origin/go
the steps is as following:
root@cloud:/gvisor# ls AUTHORS go.mod go.sum LICENSE pkg README.md runsc shim webhook root@cloud:/gvisor# cd runsc/
root@cloud:~/gvisor/runsc# go build

Ok, I do not support this branch now. Maybe you can try bazel build runsc on master branch.

@magnate3
Copy link
Author

magnate3 commented Jan 7, 2021

@zhlhahaha which bazel verison do you use?

root@cloud:/gvisor# ~/bazel/bazel-3.7.2-linux-arm64 version
Build label: 3.7.2
Build target: bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Dec 17 17:01:12 2020 (1608224472)
Build timestamp: 1608224472
Build timestamp as int: 1608224472

@prattmic prattmic changed the title pmdEntry.SetSuper undefined (type *PTE has no field or method SetSuper) Go branch does not build on arm64 Jan 7, 2021
@zhlhahaha
Copy link
Contributor

@magnate3

bazel version

Build label: 3.7.1- (@non-git)
Build target: bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Dec 4 06:20:25 2020 (1607062825)
Build timestamp: 1607062825
Build timestamp as int: 1607062825

@magnate3
Copy link
Author

magnate3 commented Jan 8, 2021

@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
Build label: 3.7.1
Build target: bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Nov 24 18:28:32 2020 (1606242512)
Build timestamp: 1606242512
Build timestamp as int: 1606242512

bazel build runsc
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:14:
Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:125:14: rbe_default not using checked in configs; Bazel version 3.7.2 was picked/selected but no checked in config was found in map {"0.20.0": ["8.0.0"], "0.21.0": ["8.0.0"], "0.22.0": ["8.0.0", "9.0.0"], "0.23.0": ["8.0.0", "9.0.0"], "0.23.1": ["8.0.0", "9.0.0"], "0.23.2": ["9.0.0"], "0.24.0": ["9.0.0"], "0.24.1": ["9.0.0"], "0.25.0": ["9.0.0"], "0.25.1": ["9.0.0"], "0.25.2": ["9.0.0"], "0.26.0": ["9.0.0"], "0.26.1": ["9.0.0"], "0.27.0": ["9.0.0"], "0.27.1": ["9.0.0"], "0.28.0": ["9.0.0"], "0.28.1": ["9.0.0"], "0.29.0": ["9.0.0"], "0.29.1": ["9.0.0", "10.0.0"], "1.0.0": ["9.0.0", "10.0.0"], "1.0.1": ["10.0.0"], "1.1.0": ["10.0.0"], "1.2.0": ["10.0.0"], "1.2.1": ["10.0.0"], "2.0.0": ["10.0.0"], "2.1.0": ["10.0.0"], "2.1.1": ["10.0.0", "11.0.0"], "2.2.0": ["11.0.0"], "3.0.0": ["11.0.0"], "3.1.0": ["11.0.0"]}
INFO: Analyzed target //runsc:runsc (329 packages loaded, 11593 targets configured).
INFO: Found 1 target...
ERROR: /gvisor/runsc/cmd/BUILD:5:11: GoCompilePkg runsc/cmd/cmd.a failed (Exit 1): 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 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
compilepkg: missing strict dependencies:
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/boot.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/checkpoint.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/create.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/debug.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/delete.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/do.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/error.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/events.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/exec.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/gofer.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/help.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/install.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/kill.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/list.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/pause.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/ps.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/restore.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/resume.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/run.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/spec.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/start.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/state.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/statefile.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/symbolize.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/syscalls.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/wait.go: import of "github.com/google/subcommands"
No dependencies were provided.
Check that imports in Go sources match importpath attributes in deps.
Target //runsc:runsc failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 135.934s, Critical Path: 43.61s
INFO: 1650 processes: 37 internal, 1613 linux-sandbox.
FAILED: Build did NOT complete successfully

@amscanne
Copy link
Contributor

amscanne commented Jan 8, 2021

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.:
https://github.com/google/gvisor/blob/go/pkg/sentry/loader/vdso_bin.go#L5

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.

@magnate3
Copy link
Author

magnate3 commented Jan 8, 2021

@amscanne Have you runned in arm64?
I am building for ARM on the master branch. the following problem happens

bazel build runsc
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:14:
Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:125:14: rbe_default not using checked in configs; Bazel version 3.7.2 was picked/selected but no checked in config was found in map {"0.20.0": ["8.0.0"], "0.21.0": ["8.0.0"], "0.22.0": ["8.0.0", "9.0.0"], "0.23.0": ["8.0.0", "9.0.0"], "0.23.1": ["8.0.0", "9.0.0"], "0.23.2": ["9.0.0"], "0.24.0": ["9.0.0"], "0.24.1": ["9.0.0"], "0.25.0": ["9.0.0"], "0.25.1": ["9.0.0"], "0.25.2": ["9.0.0"], "0.26.0": ["9.0.0"], "0.26.1": ["9.0.0"], "0.27.0": ["9.0.0"], "0.27.1": ["9.0.0"], "0.28.0": ["9.0.0"], "0.28.1": ["9.0.0"], "0.29.0": ["9.0.0"], "0.29.1": ["9.0.0", "10.0.0"], "1.0.0": ["9.0.0", "10.0.0"], "1.0.1": ["10.0.0"], "1.1.0": ["10.0.0"], "1.2.0": ["10.0.0"], "1.2.1": ["10.0.0"], "2.0.0": ["10.0.0"], "2.1.0": ["10.0.0"], "2.1.1": ["10.0.0", "11.0.0"], "2.2.0": ["11.0.0"], "3.0.0": ["11.0.0"], "3.1.0": ["11.0.0"]}
INFO: Analyzed target //runsc:runsc (329 packages loaded, 11593 targets configured).
INFO: Found 1 target...
ERROR: /gvisor/runsc/cmd/BUILD:5:11: GoCompilePkg runsc/cmd/cmd.a failed (Exit 1): 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)

copybara-service bot pushed a commit that referenced this issue Jan 9, 2021
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
@avagin
Copy link
Collaborator

avagin commented Jan 12, 2021

@amscanne has a fix for the go branch: #5229. It will be merged soon.

ERROR: /gvisor/runsc/cmd/BUILD:5:11: GoCompilePkg runsc/cmd/cmd.a failed (Exit 1): 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)

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.

@magnate3
Copy link
Author

@amscanne thank you, when will you be able to merge it ? by that time I can rebuild the gvisor

@amscanne amscanne reopened this Jan 12, 2021
@amscanne
Copy link
Contributor

I've confirmed that this is now working as expected. Please reopen if there are still any issues.

@magnate3
Copy link
Author

@amscanne the issues are stilll exist.

git fetch --all
Fetching origin
remote: Enumerating objects: 431, done.
remote: Counting objects: 100% (431/431), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 494 (delta 396), reused 417 (delta 386), pack-reused 63
Receiving objects: 100% (494/494), 86.63 KiB | 34.00 KiB/s, done.
Resolving deltas: 100% (397/397), completed with 266 local objects.
From https://github.com/google/gvisor
a20da70..e74aa25 master -> origin/master
1ea6658..43ca8a8 go -> origin/go

  • 2d5ef52...bf35d73 test/cl344879562 -> origin/test/cl344879562 (forced update)
  • 39e12b533...fee5d2cdc test/cl347771969 -> origin/test/cl347771969 (forced update)
  • b0d2ba5...997c555 test/cl350844518 -> origin/test/cl350844518 (forced update)
  • 7573892...0b25506 test/cl350862614 -> origin/test/cl350862614 (forced update)
  • 08ebd4d...4950c8e test/cl351261565 -> origin/test/cl351261565 (forced update)
  • [new branch] test/cl351393647 -> origin/test/cl351393647
  • [new branch] test/cl351424216 -> origin/test/cl351424216
  • [new branch] test/cl351428246 -> origin/test/cl351428246
  • [new branch] test/cl351436580 -> origin/test/cl351436580
  • [new branch] test/cl351468163 -> origin/test/cl351468163
  • [new branch] test/cl351476479 -> origin/test/cl351476479
  • [new branch] test/cl351508241 -> origin/test/cl351508241
    root@cloud:/gvisor# bazel clean --expunge

bazel build runsc
Starting local Bazel server and connecting to it...
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:14:
Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:125:14: rbe_default not using checked in configs; Bazel version 3.7.1 was picked/selected but no checked in config was found in map {"0.20.0": ["8.0.0"], "0.21.0": ["8.0.0"], "0.22.0": ["8.0.0", "9.0.0"], "0.23.0": ["8.0.0", "9.0.0"], "0.23.1": ["8.0.0", "9.0.0"], "0.23.2": ["9.0.0"], "0.24.0": ["9.0.0"], "0.24.1": ["9.0.0"], "0.25.0": ["9.0.0"], "0.25.1": ["9.0.0"], "0.25.2": ["9.0.0"], "0.26.0": ["9.0.0"], "0.26.1": ["9.0.0"], "0.27.0": ["9.0.0"], "0.27.1": ["9.0.0"], "0.28.0": ["9.0.0"], "0.28.1": ["9.0.0"], "0.29.0": ["9.0.0"], "0.29.1": ["9.0.0", "10.0.0"], "1.0.0": ["9.0.0", "10.0.0"], "1.0.1": ["10.0.0"], "1.1.0": ["10.0.0"], "1.2.0": ["10.0.0"], "1.2.1": ["10.0.0"], "2.0.0": ["10.0.0"], "2.1.0": ["10.0.0"], "2.1.1": ["10.0.0", "11.0.0"], "2.2.0": ["11.0.0"], "3.0.0": ["11.0.0"], "3.1.0": ["11.0.0"]}
INFO: Analyzed target //runsc:runsc (329 packages loaded, 11593 targets configured).
INFO: Found 1 target...
ERROR: /gvisor/runsc/cmd/BUILD:5:11: GoCompilePkg runsc/cmd/cmd.a failed (Exit 1): 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 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
compilepkg: missing strict dependencies:
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/boot.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/checkpoint.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/create.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/debug.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/delete.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/do.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/error.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/events.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/exec.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/gofer.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/help.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/install.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/kill.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/list.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/pause.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/ps.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/restore.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/resume.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/run.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/spec.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/start.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/state.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/statefile.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/symbolize.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/syscalls.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/wait.go: import of "github.com/google/subcommands"
No dependencies were provided.

@zhlhahaha
Copy link
Contributor

@amscanne the issues are stilll exist.

git fetch --all
Fetching origin
remote: Enumerating objects: 431, done.
remote: Counting objects: 100% (431/431), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 494 (delta 396), reused 417 (delta 386), pack-reused 63
Receiving objects: 100% (494/494), 86.63 KiB | 34.00 KiB/s, done.
Resolving deltas: 100% (397/397), completed with 266 local objects.
From https://github.com/google/gvisor
a20da70..e74aa25 master -> origin/master
1ea6658..43ca8a8 go -> origin/go

  • 2d5ef52...bf35d73 test/cl344879562 -> origin/test/cl344879562 (forced update)

  • 39e12b5...fee5d2c test/cl347771969 -> origin/test/cl347771969 (forced update)

  • b0d2ba5...997c555 test/cl350844518 -> origin/test/cl350844518 (forced update)

  • 7573892...0b25506 test/cl350862614 -> origin/test/cl350862614 (forced update)

  • 08ebd4d...4950c8e test/cl351261565 -> origin/test/cl351261565 (forced update)

  • [new branch] test/cl351393647 -> origin/test/cl351393647

  • [new branch] test/cl351424216 -> origin/test/cl351424216

  • [new branch] test/cl351428246 -> origin/test/cl351428246

  • [new branch] test/cl351436580 -> origin/test/cl351436580

  • [new branch] test/cl351468163 -> origin/test/cl351468163

  • [new branch] test/cl351476479 -> origin/test/cl351476479

  • [new branch] test/cl351508241 -> origin/test/cl351508241
    root@cloud:/gvisor# bazel clean --expunge

bazel build runsc
Starting local Bazel server and connecting to it...
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:14:
Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
DEBUG: /root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:125:14: rbe_default not using checked in configs; Bazel version 3.7.1 was picked/selected but no checked in config was found in map {"0.20.0": ["8.0.0"], "0.21.0": ["8.0.0"], "0.22.0": ["8.0.0", "9.0.0"], "0.23.0": ["8.0.0", "9.0.0"], "0.23.1": ["8.0.0", "9.0.0"], "0.23.2": ["9.0.0"], "0.24.0": ["9.0.0"], "0.24.1": ["9.0.0"], "0.25.0": ["9.0.0"], "0.25.1": ["9.0.0"], "0.25.2": ["9.0.0"], "0.26.0": ["9.0.0"], "0.26.1": ["9.0.0"], "0.27.0": ["9.0.0"], "0.27.1": ["9.0.0"], "0.28.0": ["9.0.0"], "0.28.1": ["9.0.0"], "0.29.0": ["9.0.0"], "0.29.1": ["9.0.0", "10.0.0"], "1.0.0": ["9.0.0", "10.0.0"], "1.0.1": ["10.0.0"], "1.1.0": ["10.0.0"], "1.2.0": ["10.0.0"], "1.2.1": ["10.0.0"], "2.0.0": ["10.0.0"], "2.1.0": ["10.0.0"], "2.1.1": ["10.0.0", "11.0.0"], "2.2.0": ["11.0.0"], "3.0.0": ["11.0.0"], "3.1.0": ["11.0.0"]}
INFO: Analyzed target //runsc:runsc (329 packages loaded, 11593 targets configured).
INFO: Found 1 target...
ERROR: /gvisor/runsc/cmd/BUILD:5:11: GoCompilePkg runsc/cmd/cmd.a failed (Exit 1): 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 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
compilepkg: missing strict dependencies:
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/boot.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/checkpoint.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/create.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/debug.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/delete.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/do.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/error.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/events.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/exec.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/gofer.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/help.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/install.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/kill.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/list.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/pause.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/ps.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/restore.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/resume.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/run.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/spec.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/start.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/state.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/statefile.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/symbolize.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/syscalls.go: import of "github.com/google/subcommands"
/root/.cache/bazel/_bazel_root/5c091e64dca9ad5afc61f8dabe991a85/sandbox/linux-sandbox/1614/execroot/main/runsc/cmd/wait.go: import of "github.com/google/subcommands"
No dependencies were provided.

Can you try

bazel clean --expunge
rm -rf /root/.cache/bazel/*
bazel build runsc

@magnate3
Copy link
Author

@zhlhahaha
do the following commands,the problem still exists
bazel clean --expunge
rm -rf /root/.cache/bazel/*
bazel build runsc

@zhlhahaha
Copy link
Contributor

@zhlhahaha
do the following commands,the problem still exists
bazel clean --expunge
rm -rf /root/.cache/bazel/*
bazel build runsc

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.

@magnate3
Copy link
Author

@zhlhahaha which bazel version you use?
root@cloud:/gvisor# bazel version
Starting local Bazel server and connecting to it...
Build label: 3.7.1
Build target: bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Nov 24 18:28:32 2020 (1606242512)
Build timestamp: 1606242512
Build timestamp as int: 1606242512

@zhlhahaha
Copy link
Contributor

@zhlhahaha which bazel version you use?
root@cloud:/gvisor# bazel version
Starting local Bazel server and connecting to it...
Build label: 3.7.1
Build target: bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Nov 24 18:28:32 2020 (1606242512)
Build timestamp: 1606242512
Build timestamp as int: 1606242512

bazel version
Build label: 3.7.1- (@non-git)
Build target: bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Dec 4 06:20:25 2020 (1607062825)
Build timestamp: 1607062825
Build timestamp as int: 1607062825

@magnate3
Copy link
Author

@zhlhahaha with go build . which go version you use?

@zhlhahaha
Copy link
Contributor

@zhlhahaha with go build . which go version you use?

go version go1.15.5 linux/arm64

@amscanne
Copy link
Contributor

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?

@magnate3
Copy link
Author

@amscanne @zhlhahaha thanks. now, I can build the runsc successfully.

root@cloud:/gvisor# docker run --runtime=runsc -it ubuntu /bin/bash
root@1e2afa149853:/# ip a
bash: ip: command not found
root@1e2afa149853:/# ls
bin boot dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var
root@1e2afa149853:/#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants