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

Compilation docs no longer work in latest grpc-java #10317

Closed
pkwarren opened this issue Jun 27, 2023 · 4 comments
Closed

Compilation docs no longer work in latest grpc-java #10317

pkwarren opened this issue Jun 27, 2023 · 4 comments

Comments

@pkwarren
Copy link
Contributor

What version of gRPC-Java are you using?

v1.56.0

What is your environment?

MacOS/Linux arm64

What did you expect to see?

Following instructions in COMPILING.md should result in a successful build.

What did you see instead?

https://github.com/grpc/grpc-java/blob/f3399e3d0e52c4c20409de3b4435fea12bec12c6/COMPILING.md#how-to-build-code-generation-plugin refers to the protobuf-all artifact, which is no longer shipped with newer releases (grpc-java requires protoc 22.3). It also refers to using autotools to build protoc from source, which is no longer supported (ref: https://protobuf.dev/news/2022-08-03/).

Steps to reproduce the bug

Attempt to follow the steps in COMPILING.md to build grpc-java (including the compiler).

@pkwarren
Copy link
Contributor Author

It looks like #10048 will fix most of these issues (when merged).

@ejona86
Copy link
Member

ejona86 commented Jun 27, 2023

Ugh, yeah. The trick right now is Java is depending on 22.3, but we are still using 21.x for c++. Do the instructions work if you try and use the older version?

@pkwarren
Copy link
Contributor Author

Ugh, yeah. The trick right now is Java is depending on 22.3, but we are still using 21.x for c++. Do the instructions work if you try and use the older version?

Good to know. I got confused by this while building:

> Configure project :grpc-compiler
*** Building codegen requires Protobuf version 3.22.3

I managed to get it building with the current instructions (although I had to set org.gradle.jvmargs=-Xmx4g in gradle.properties to get xds code to build as the default 1g wasn't enough).

@pkwarren pkwarren closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2023
@ejona86
Copy link
Member

ejona86 commented Jun 28, 2023

*** Building codegen requires Protobuf version 3.22.3

Oh... I know how that happened. I think I'm just going to delete the version in that message. Most of the time you can use an older version without issue.

although I had to set org.gradle.jvmargs=-Xmx4g in gradle.properties to get xds code to build as the default 1g wasn't enough

"Fork javac to avoid OOM" in #10299 may fix that. We've been fighting OOM for a while on the CI; I'm hopeful we've tracked down the major source.

ejona86 added a commit to ejona86/grpc-java that referenced this issue Jun 28, 2023
There's been minor version skew between Java and C++ many times because
certain releases are one-language-only. And now we have more severe
skew, where we can't readily upgrade to newer C++ Protobuf versions
because of build complexity. Let's just remove the version, and have the
canonical C++ Protobuf version live in COMPILING.md.

See grpc#10317
ejona86 added a commit that referenced this issue Jun 29, 2023
There's been minor version skew between Java and C++ many times because
certain releases are one-language-only. And now we have more severe
skew, where we can't readily upgrade to newer C++ Protobuf versions
because of build complexity. Let's just remove the version, and have the
canonical C++ Protobuf version live in COMPILING.md.

See #10317
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants