Skip to content

Unable to build java with Bazel following README.md #20504

Open
@KoningR

Description

@KoningR

What version of protobuf and what language are you using?
Version: protobuf-30.0-rc2
Language: Java

What operating system (Linux, Windows, ...) and version?
MacOS Sequoia 15.3.1

What runtime / compiler are you using (e.g., python version or gcc version)
Bazel 8.1.0-homebrew

What did you do?
Steps to reproduce the behavior:

  1. Download and unzip protobuf-30.0-rc2.zip and source code from release.
  2. Following the README:
    2.1 Move bin and include to protobuf-30.0-rc2/src
    2.2 cd java
    2.2 ../src/bin/protoc --java_out=core/src/main/java -I../src ../src/google/protobuf/descriptor.proto
    2.3 bazel build //java:release

What did you expect to see
Successful build

What did you see instead?
ERROR: /Users/xxx/Documents/protobuf-30.0-rc2/java/BUILD.bazel:4:1: name 'sh_test' is not defined (did you mean 'cc_test'?)
WARNING: Target pattern parsing failed.
ERROR: Skipping '//java:release': no such target '//java:release': target 'release' not declared in package 'java' defined by /Users/xxx/Documents/protobuf-30.0-rc2/java/BUILD.bazel
ERROR: no such target '//java:release': target 'release' not declared in package 'java' defined by /Users/xxx/Documents/protobuf-30.0-rc2/java/BUILD.bazel
INFO: Elapsed time: 0.069s
INFO: 0 processes.
ERROR: Build did NOT complete successfully

Anything else we should know about your project / environment
I am following the instructions specified in protobuf-30.0-rc2/java/README.md and am unable to build for Java.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions