magenta / note-seq

A serializable note sequence representation and utilities.
Apache License 2.0
210 stars 57 forks source link

which bazel version should I use? #59

Closed xk-wang closed 2 years ago

xk-wang commented 2 years ago

Hello, I tried to compile this code using the bazel as described in the readme document. I met the following errors:

ERROR: /home/wxk/.cache/bazel/_bazel_wxk/aead400c0d4e3cefd21e17e4d75c732c/external/rules_pkg/pkg/mappings.bzl:108:12: name 'json' is not defined
ERROR: /home/wxk/.cache/bazel/_bazel_wxk/aead400c0d4e3cefd21e17e4d75c732c/external/rules_pkg/pkg/mappings.bzl:224:22: name 'json' is not defined
ERROR: /home/wxk/.cache/bazel/_bazel_wxk/aead400c0d4e3cefd21e17e4d75c732c/external/rules_pkg/pkg/mappings.bzl:413:22: name 'json' is not defined
ERROR: /home/wxk/.cache/bazel/_bazel_wxk/aead400c0d4e3cefd21e17e4d75c732c/external/rules_pkg/pkg/mappings.bzl:473:22: name 'json' is not defined
INFO: Repository eigen_repo instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
  /home/wxk/.cache/bazel/_bazel_wxk/aead400c0d4e3cefd21e17e4d75c732c/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
ERROR: /home/data/wxk/other_dataset/test_align_note_seq/note-seq/note_seq/alignment/BUILD.bazel:45:17: error loading package '@com_google_protobuf//': in /home/wxk/.cache/bazel/_bazel_wxk/aead400c0d4e3cefd21e17e4d75c732c/external/rules_pkg/mappings.bzl: Extension 'pkg/mappings.bzl' has errors and referenced by '//:alignment_py_pb2'
ERROR: Analysis of target '//:align_fine' failed; build aborted: Analysis failed
INFO: Elapsed time: 3.517s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (19 packages loaded, 69 targets configured)
FAILED: Build did NOT complete successfully (19 packages loaded, 69 targets configured)

My system is CentOS 7. I tried bazel vesion of 1.2.1, 2.2.0, 3.2.0, 3.6.0, but all are failed. So I wonder if I use the wrong version of bazel or any other erros. Thank you.

xk-wang commented 2 years ago

I'have solved this problem. The latest bazel works fine for me.

ZJU-Try commented 1 year ago

Hello, I‘ve met a similar error. Something about 'cc_proto_library' is also mentioned, and I can't solve it: ERROR: Traceback (most recent call last): File "/Users/try/Desktop/AM-align/align-test/note-seq-main/note_seq/alignment/BUILD.bazel", line 3, column 46, in <toplevel> load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") Error: file '@com_google_protobuf//:protobuf.bzl' does not contain symbol 'cc_proto_library' (did you mean 'py_proto_library'?) ERROR: Skipping ':align_fine': no such target '//:align_fine': target 'align_fine' not declared in package '' defined by /Users/try/Desktop/AM-align/align-test/note-seq-main/note_seq/alignment/BUILD.bazel (Tip: usequery "//:"to see all the targets in that package) WARNING: Target pattern parsing failed. ERROR: no such target '//:align_fine': target 'align_fine' not declared in package '' defined by /Users/try/Desktop/AM-align/align-test/note-seq-main/note_seq/alignment/BUILD.bazel (Tip: usequery "//:"to see all the targets in that package) INFO: Elapsed time: 0.076s INFO: 0 processes. FAILED: Build did NOT complete successfully (1 packages loaded) ERROR: Build failed. Not running target I'm running this code on an intel MacBook (OS: macOS13.1),I tried bazel 1.0.0, 5.2.0, 6.0.0, and I'm not sure if it's the problem of the bazel version. NEED some help, thank you.