Skip to content
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

protobuf bazel module stuck at 24.4, 26.0 causes segfault when constructing descriptor_pb2.py #91

Open
michael-christen opened this issue Aug 18, 2024 · 0 comments

Comments

@michael-christen
Copy link
Owner

# XXX: This was causing the descriptor_pb2.py segfault with
# //modules/blinky:service
# external/protobuf~/.: warning: directory does not exist.
# ERROR: /home/mchristen/.local/tmp/bazel/_bazel_mchristen/eabc9c58e7a2790b61df5bad4df6e1e8/external/nanopb~/BUILD.bazel:88:17: ProtoCompile external/nanopb~/generator/proto/google/protobuf/descriptor_pb2.py [for tool] failed: (Segmentation fault): protoc failed: error executing ProtoCompile command (from target @@nanopb~//:descriptor_py_proto_genproto)
#   (cd /home/mchristen/.local/tmp/bazel/_bazel_mchristen/eabc9c58e7a2790b61df5bad4df6e1e8/sandbox/linux-sandbox/3486/execroot/_main && \
#   exec env - \
#     PATH=/bin:/usr/bin:/usr/local/bin \
#   bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf~/protoc '--python_out=bazel-out/k8-opt-exec-ST-d0eb3b6eed71/bin/external/nanopb~/generator/proto' -Iexternal/nanopb~/generator/proto external/nanopb~/generator/proto/google/protobuf/descriptor.proto)
#
# Version 26.0 caused a failure when compiling nanopb
michael-christen added a commit that referenced this issue Aug 18, 2024
###Large Changes
- hermetic C++ compilation with clang toolchain
  - had to remove a few gcc specific copts
- commented out rust targets see #90
- Updates bazel from 7.2.1 to a specific commit of 8.0.0-pre

### Miscellaneous Changes
- Updated .bazelignore to ignore bazel-bin, bazel-out, bazel-testlogs
- add `-diff` to `.gitattributes` for our big lock files so when diffing
we
  just see it as a "binary" and don't make `git diff` unintelligible
- Fixed location of try-import in .bazelrc (should always be last)

NOTE: You can add `per_file_copts` with `--per_file_copt`, for example
to
ignore warnings in `third_party` code

### Followup
- add support for stm32 and rp platforms

### Related Issues:
- #90
- #91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant