-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Regression in v0.34.0 breaks go_image on M1 macs #3269
Comments
Do you have a reproducer I can run on my Mac? The output with The correct future solution for these kind of issues seems to be to make the C++ toolchain requirement optional. This is only possible on Bazel HEAD though. |
I pulled out an old template project to use for a reproducer, and it's behaving a little differently. 😕 That project works with any version of rules_go. However, in both repos, it will only ever work if my goos = "linux",
goarch = "amd64", If those are omitted, I get the same error I mentioned above (in either repo, regardless of rules_go version): private main project:
public reproducer project (instructions below):
I can't share the main project I'm working on, and I'm not yet sure what the difference between the projects is that causes my main project to fail on v0.34.0 even when these parameters are set. ReproducingThe template project repo is https://github.com/stabai/readysetgo/tree/repro/rules_go/3269 and I will leave its To reproduce the issue, clone the repo, switch to the bazel build src/example/service:example-go-grpc-image # succeeds
bazel build src/example/service:example-go-grpc-image-broken # fails with error Since I can't share the main project I'm working on, I don't currently have a way for you to reproduce the issue that fails on v0.34.0 and succeeds on v0.33.0. However, tell me if that's an important part of debugging, and I can figure out what the difference is to make a sharable version of that. The error message and toolchain resolution debug output for that project when using v0.34.0 is exactly the same as what happens in this demo repo's broken target. Toolchain resolution debug output
|
this is not really rules_go's issue, it is rules_docker 's issue you can work around this by upgrading to rules_docker latest then
and you can add this to .bazelrc file |
Same issue even with |
What version of rules_go are you using?
v0.34.0
What version of gazelle are you using?
v0.25.0
What version of Bazel are you using?
Bazelisk version: v1.11.0
Build label: 5.2.0
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 7 16:11:09 2022 (1654618269)
Build timestamp: 1654618269
Build timestamp as int: 1654618269
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
OS: macOS Monterey v12.5
Architecture: Apple M1 (arm64) Max
Model: MacBook Pro (16-inch, 2021)
Any other potentially useful information about your toolchain?
N/A
What did you do?
After upgrading to rules_go v0.34.0, I tried to build a docker image for my go application by running:
What did you expect to see?
A successful build of the docker image, followed by loading and tagging the image.
What did you see instead?
I get the error below when building the docker image with rules_go v0.34.0.
My
go_binary
targets still work, but mygo_image
targets (using rules_docker) give me an error.Note: Switching back to v0.33.0 (or any of the previous 5 releases) makes the error go away. The issue only presents when I use rules_go v0.34.0. I switched nothing else in the entire workspace between testing different versions.
The text was updated successfully, but these errors were encountered: