google / private-join-and-compute

Apache License 2.0
792 stars 138 forks source link

name 'json' is not defined #42

Closed zhangtingchuang666 closed 1 year ago

zhangtingchuang666 commented 1 year ago

bazel build //private_join_and_compute:all DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "d594b561fb41bf243233d8f411c7f2b7d913e5c9c1be4ca439baf7e48384c893" DEBUG: Repository com_google_protobuf instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule http_archive defined at: /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/8c6f03768dccbef555c19625ba83d33a/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in ERROR: /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/8c6f03768dccbef555c19625ba83d33a/external/rules_python/python/pip_install/pip_repository.bzl:129:29: name 'json' is not defined ERROR: /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/8c6f03768dccbef555c19625ba83d33a/external/rules_python/python/pip_install/pip_repository.bzl:131:33: name 'json' is not defined ERROR: /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/8c6f03768dccbef555c19625ba83d33a/external/rules_python/python/pip_install/pip_repository.bzl:429:12: name 'json' is not defined ERROR: error loading package '': in /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/8c6f03768dccbef555c19625ba83d33a/external/rules_python/python/pip.bzl: Extension 'python/pip_install/pip_repository.bzl' has errors INFO: Elapsed time: 0.039s INFO: 0 processes.

karnseth commented 1 year ago

Hello, likely this is due to an outdated bazel version. Please update Bazel and try again: https://bazel.build/install/ubuntu#install-bazel

zhangtingchuang666 commented 1 year ago

Thanks!I solve this problem by updating version of bazel.

zhangtingchuang666 commented 1 year ago

But I encounter new problem

zhangtingchuang666 commented 1 year ago

bazel build //private_join_and_compute:all Extracting Bazel installation... Starting local Bazel server and connecting to it... DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "d594b561fb41bf243233d8f411c7f2b7d913e5c9c1be4ca439baf7e48384c893" DEBUG: Repository com_google_protobuf instantiated at: /home/ubuntu22/Downloads/private-join-and-compute/WORKSPACE:20:9: in /home/ubuntu22/Downloads/private-join-and-compute/bazel/pjc_deps.bzl:55:21: in pjc_deps Repository rule http_archive defined at: /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/bazel_tools/tools/build_defs/repo/http.bzl:379:31: in ERROR: Traceback (most recent call last): File "/home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/internal/rule_support.bzl", line 226, column 36, in deps_cfg = apple_common.multi_arch_split, Error: 'apple_common' value has no field or method 'multi_arch_split' INFO: Repository rules_proto instantiated at: /home/ubuntu22/Downloads/private-join-and-compute/WORKSPACE:37:16: in /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:49:18: in grpc_extra_deps /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/com_google_protobuf/protobuf_deps.bzl:76:24: in protobuf_deps /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/com_google_protobuf/protobuf_deps.bzl:19:17: in _github_archive Repository rule http_archive defined at: /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/bazel_tools/tools/build_defs/repo/http.bzl:379:31: in INFO: Repository build_bazel_rules_swift instantiated at: /home/ubuntu22/Downloads/private-join-and-compute/WORKSPACE:37:16: in /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:63:29: in grpc_extra_deps /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/repositories.bzl:120:11: in apple_rules_dependencies /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/repositories.bzl:86:14: in _maybe Repository rule http_archive defined at: /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/bazel_tools/tools/build_defs/repo/http.bzl:379:31: in WARNING: Target pattern parsing failed. ERROR: Skipping '//private_join_and_compute:all': while parsing '//private_join_and_compute:all': error loading package 'private_join_and_compute': at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl:34:6: at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/ios.bzl:26:5: at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl:22:5: at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/internal/testing/apple_test_bundle_support.bzl:66:5: initialization of module 'apple/internal/rule_support.bzl' failed ERROR: while parsing '//private_join_and_compute:all': error loading package 'private_join_and_compute': at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl:34:6: at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/ios.bzl:26:5: at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl:22:5: at /home/ubuntu22/.cache/bazel/_bazel_ubuntu22/d36e09ebb61ec871385b14beb0a11f5d/external/build_bazel_rules_apple/apple/internal/testing/apple_test_bundle_support.bzl:66:5: initialization of module 'apple/internal/rule_support.bzl' failed INFO: Elapsed time: 10.589s INFO: 0 processes. ERROR: Build did NOT complete successfully Loading: 0 packages loaded currently loading: private_join_and_compute Fetching https://github.com/...7a30f6f80006b591fa7c437fe5a951eb10bcbcf.zip Fetching https://github.com/.../download/0.24.0/rules_swift.0.24.0.tar.gz ubuntu22@ubuntu22-OptiPlex-Tower-Plus-7010:~/Downloads/private-join-and-compute$ bazel --cersion [FATAL 22:20:37.464 src/main/cpp/blaze.cc:1102] Unknown startup option: '--cersion'. For more info, run 'bazel help startup_options'. ubuntu22@ubuntu22-OptiPlex-Tower-Plus-7010:~/Downloads/private-join-and-compute$ bazel --version bazel 7.0.0-pre.20230810.1 ubuntu22@ubuntu22-OptiPlex-Tower-Plus-7010:~/Downloads/private-join-and-compute$ bazel [bazel release 7.0.0-pre.20230810.1] Usage: bazel ...

Available commands: analyze-profile Analyzes build profile data. aquery Analyzes the given targets and queries the action graph. build Builds the specified targets. canonicalize-flags Canonicalizes a list of bazel options. clean Removes output files and optionally stops the server. coverage Generates code coverage report for specified test targets. cquery Loads, analyzes, and queries the specified targets w/ configurations. dump Dumps the internal state of the bazel server process. fetch Fetches external repositories that are prerequisites to the targets. help Prints help for commands, or the index. info Displays runtime info about the bazel server. license Prints the license of this software. mobile-install Installs targets to mobile devices. mod Queries the Bzlmod external dependency graph print_action Prints the command line args for compiling a file. query Executes a dependency graph query. run Runs the specified target. shutdown Stops the bazel server. sync Syncs all repositories specified in the workspace file test Builds and runs the specified test targets. version Prints version information for bazel.

Getting more help: bazel help Prints help and options for . bazel help startup_options Options for the JVM hosting bazel. bazel help target-syntax Explains the syntax for specifying targets. bazel help info-keys Displays a list of keys used by the info command.

zhangtingchuang666 commented 1 year ago

bazel --version bazel 7.0.0-pre.20230810.1

karnseth commented 1 year ago

I think running "bazel clean " and retrying should help

zhangtingchuang666 commented 1 year ago

sorry, I try "bazel clean", but it fail too.

zhangtingchuang666 commented 1 year ago

Could you tell me the version of bazel that you use to build this project?

zhangtingchuang666 commented 1 year ago

Thanks, I solve this problem by using bazel 4.1.0