-
Notifications
You must be signed in to change notification settings - Fork 521
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
Bazel 4.0 not building project correctly on macOs Monterrey version 12.4 #4391
Comments
Thanks for filing this @KevinGitonga. This issue will be blocked on us being able to upgrade to Bazel 5.0 (which is the recommendation in the reference Bazel bug above). We can't do that until Bazel is moved over to using the new D8 tool (since it forces using build tools 31+ which removes the desugar compatibility tool that Bazel expects--see bazelbuild/bazel#13989). I'm tracking the other constituent work items needed to unblock this work. |
Hey @KevinGitonga, Could you please try this build to see if it is still reproducible? @kkmurerwa had a similar issue on M1, and we were able to find a fix (unused imports in the affected models -- which seem not to be an issue with the highlighted |
<!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> Fix part of #4391 : Fix failing build on M1 Macs ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Some M1 Macs fail to build the Oppia app because of unused imports in some of the proto files in the project. This PR attempts to fix this issue by removing unused imports in proto files. Files affected by this fix are; - profile.proto - deprecation.proto This is a temporary fix and more investigation will need to be done to properly understand why this behavior is erratic and why it only happens in some instances and not in others. More checks are also needed to ensure that proto files only have imports that are used in the proto file before they are merged. Besides build fixes, this PR also; - Includes a fix for the `buildifier_download.sh` which previously did not work for MacOS users. - Introduces a `static_checks.sh` file to allow contributors to run all static checks locally before pushing the code to Git. - Adds a wiki entry in the Static-Analysis-Checks wiki. The entry contains instructions on how to run static checks locally with the static_checks.sh file. ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). --------- Co-authored-by: Kenneth Murerwa <[email protected]> Co-authored-by: Adhiambo Peres <[email protected]>
Describe the bug
Building project with bazel using macOs Monterrey version 12.4 on terminal fails see logs below for context
Generating JavaLite proto_library //model/src/main/proto:event_logger_proto failed: (Segmentation fault): protoc failed: error executing command bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc '--proto_path=bazel-out/android-armeabi-v7a-fastbuild/bin/model/src/main/proto/_virtual_imports/math_proto' ... (remaining 22 argument(s) skipped)
To Reproduce
Steps to reproduce the behavior:
bazel build //:oppia
on terminalExpected behavior
I expect Bazel to build project successfully and be able to generate required artifacts.
Demonstration
Environment
Additional context
Issue with similar specs on Bazel repository
bazelbuild/bazel#14469
The text was updated successfully, but these errors were encountered: