-
Notifications
You must be signed in to change notification settings - Fork 70
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
chore: bump Bazel from 5.2.0 to 6.5.0 #402
Conversation
Signed-off-by: Martijn Stevenson <[email protected]>
Ugh, Maybe IBM / Red Hat folks have it publicly available somewhere? |
Is this worth supporting? Should we disable the check for now?
Maybe this? https://github.com/james-crowley/bazel/blob/s390x_patch/Dockerfile @PiotrSikora Can you try and republish the above for Bazel 6.5.0? |
Fixing rules_rust diff... |
Signed-off-by: Martijn Stevenson <[email protected]>
IBM / Red Hat (Istio vendor) relies on Envoy with Wasm building on s390x. That build isn't verified in Envoy's CI, but they definitely support it. @knm3000 do you guys have a publicaly available Bazel build that we could use?
No, I've crated one from scratch and spent quite some time debugging it. As far as I recall, the more recent version didn't build from scratch on s390x, but if you had a working version of Bazel, then it would work fine (basically, you had to build 3.x or 4.x and then use it to build the more recent versions). Since Bazel 5.2 is published on the linked DockerHub, you should be able to use it to build 6.0 and/or 6.5 from it. |
AFAIK there is no publicly available bazel builds for s390x. But it is possible to build it from scratch without previous version of bazel binary. The point is that we should not use "git clone github.com/bazelbuild/bazel" to get the source code, since some files are missing when doing git clone. Instead we should download bazel-$BAZEL_VERSION-dist.zip to get the full bazel source code:
|
@knm3000 do you have any more pointers? I am able to build the Dockerfile below on linux/amd64 but not linux/s390x. It fails pretty early (apt update). Should I pick a different base image than Ubuntu?
Dockerfile:
|
@martijneken do you have QEMU & binfmt installed? Try running this:
and/or this:
|
Thanks @PiotrSikora. That seemed to do it. Also found https://docs.docker.com/build/building/multi-platform/#qemu, though that elides the qemu install step for some reason. I'll let you know if/when I get stuck again :-) |
I got Bazel compiled for s390x with QEMU (took > 1 hour). Now I'm struggling with all the other implicit dependencies in our non-hermetic Bazel build process:
This is threatening to take a long time. I may have to punt on this so we make forward progress with CI / deps updates. WDYT @PiotrSikora -- OK to defer s390x CI to a separate issue? |
The below Docker container can run CppHost null + wasmtime tests on native linux/amd64. Verifying s390x now with QEMU. Then see if CI works.
|
You can test deps and all building for native your native platform (x86_64 / arm64), which should take only a few minutes.
You can specify multiple targets in
|
Entering hour 8 of a local QEMU based Bazel compilation... Not sure how the first time took <2 hours. |
You can restart it... As far as I recall, the process would simply hang most of the time (and using older version of Bazel to compile the new one instead of building from scratch significantly lowered the chance of that). |
This is... not good. I'll give it a few more tries but I'm on my fourth attempt already. @knm3000 |
Would it be possible to disable s390x CI to get this PR unblocked and then tackle it separately in a follow-up? |
+1 to dealing with s390x build issues separately, and not holding up this PR on that. |
Made progress but got stuck again. Splitting the s390x work into another issue: #405 Please review as is (s390x failing). |
Does it make sense to just merge #404 since it contains the commits from this PR? |
Maybe push your image and use it here to verify that s390x is indeed broken (see: #405 (comment))? |
- Dockerfile to build multiarch Bazel - CI update to use the published image Signed-off-by: Martijn Stevenson <[email protected]>
Good insight on #405 (comment). My local testing was not the same as CI (which uses prebuilt testdata files). I have published an s390x Ubuntu 20.04 image with Bazel here: https://github.com/orgs/proxy-wasm/packages/container/package/build-tools CI is now running to see whether it worked. |
It looks that it was published as "internal" image, which requires credentials on the CI. Could you make it public instead? |
Signed-off-by: Martijn Stevenson <[email protected]>
Signed-off-by: Martijn Stevenson <[email protected]>
Signed-off-by: Martijn Stevenson <[email protected]>
The s390x image is missing |
Bummer, another error. Will leave the CI changes for now and continue in #405. |
Fine fine, I'll try again to get it working :-D |
Signed-off-by: Martijn Stevenson <[email protected]>
I ran into trouble with Bazel 7 (moved to #403), but this still moves things forward.