bazel-contrib / rules_jsonnet

Jsonnet rules for Bazel
https://bazelbuild.github.io/rules_jsonnet/
Apache License 2.0
69 stars 73 forks source link

bazel 6.0.0 breakage? #167

Closed schwehr closed 5 months ago

schwehr commented 1 year ago

I'm not sure exactly what is the source of this issue. Happen on macosx with brew and ubuntu like here: https://github.com/google/earthengine-catalog/actions/runs/3733503946/jobs/6334381112

bazel run //checker:ee_stac_check
ERROR: /private/var/tmp/_bazel_schwehr/157f2da64734466b98b89a1fde104b92/external/bazel_tools/platforms/BUILD:29:6: in alias rule @bazel_tools//platforms:arm: Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms. See https://github.com/bazelbuild/bazel/issues/8622 for details.
ERROR: /private/var/tmp/_bazel_schwehr/157f2da64734466b98b89a1fde104b92/external/bazel_tools/platforms/BUILD:29:6: Analysis of target '@bazel_tools//platforms:arm' failed
ERROR: /Users/schwehr/earthengine-catalog/checker/BUILD:5:10: While resolving toolchains for target //checker:ee_stac_check: invalid registered toolchain '@go_sdk//:go_android_arm_cgo': 
ERROR: Analysis of target '//checker:ee_stac_check' failed; build aborted: 

See also:

https://github.com/bazelbuild/bazel/issues/8622#issuecomment-1358030098

schwehr commented 1 year ago

Not sure what this is about...

~/.npm/packages/bin/bazel build //...
INFO: Analyzed 1167 targets (92 packages loaded, 13538 targets configured).
INFO: Found 1167 targets...
ERROR: /usr/local/google/home/schwehr/.cache/bazel/_bazel_schwehr/c6faef3bcc52c6463140291b5d18dfec/external/go_sdk/BUILD.bazel:43:15: GoToolchainBinary external/go_sdk/builder [for tool] failed: (Exit 1): go failed: error executing command (from target @go_sdk//:builder) external/go_sdk/bin/go tool link -o bazel-out/k8-opt-exec-2B5CBBC6/bin/external/go_sdk/builder bazel-out/k8-opt-exec-2B5CBBC6/bin/external/go_sdk/builder.a

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
type:*<unlinkable>.cgoError: relocation target <unlinkable>.(*cgoError).Error not defined
type:*<unlinkable>.depsError: relocation target <unlinkable>.(*depsError).Error not defined
type:<unlinkable>.cgoError: relocation target <unlinkable>.(*cgoError).Error not defined
type:<unlinkable>.cgoError: relocation target <unlinkable>.cgoError.Error not defined
type:*<unlinkable>.archiveMultiFlag: relocation target <unlinkable>.(*archiveMultiFlag).Set not defined
type:*<unlinkable>.archiveMultiFlag: relocation target <unlinkable>.(*archiveMultiFlag).String not defined
type:*<unlinkable>.multiFlag: relocation target <unlinkable>.(*multiFlag).Set not defined
type:*<unlinkable>.multiFlag: relocation target <unlinkable>.(*multiFlag).String not defined
type:*<unlinkable>.quoteMultiFlag: relocation target <unlinkable>.(*quoteMultiFlag).Set not defined
type:*<unlinkable>.quoteMultiFlag: relocation target <unlinkable>.(*quoteMultiFlag).String not defined
type:*<unlinkable>.readWithCloser: relocation target <unlinkable>.(*readWithCloser).Close not defined
type:*<unlinkable>.readWithCloser: relocation target <unlinkable>.(*readWithCloser).Read not defined
type:*<unlinkable>.tagFlag: relocation target <unlinkable>.(*tagFlag).Set not defined
type:*<unlinkable>.tagFlag: relocation target <unlinkable>.(*tagFlag).String not defined
type:<unlinkable>.depsError: relocation target <unlinkable>.(*depsError).Error not defined
type:<unlinkable>.depsError: relocation target <unlinkable>.depsError.Error not defined
[SNIP]
EdSchouten commented 5 months ago

I think that this issue was caused by some version of rules_go/jsonnet_go/... not being compatible with ARM.

Now that we simply depend on jsonnet and jsonnet-go through bzlmod, I don't think that issues like these should be reported/addressed as part of rules_jsonnet. rules_jsonnet simply assumes that the interpreters coming from those modules work as expected.

I'm going to close this issue if you don't mind, as I don't think there's anything actionable on the rules_jsonnet side.