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

Generate the pre-built protoc like maven repo #16582

Open
DingliZhang opened this issue Apr 21, 2024 · 3 comments
Open

Generate the pre-built protoc like maven repo #16582

DingliZhang opened this issue Apr 21, 2024 · 3 comments

Comments

@DingliZhang
Copy link

DingliZhang commented Apr 21, 2024

What language does this apply to?
If it's a proto syntax change, is it for proto2 or proto3?
If it's about generated code change, what programming language?

Describe the problem you are trying to solve.
Similar to this question:
#14402
I want to manually generate the following files by myself:
https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.7.1/protoc-3.7.1-linux-x86_64.exe

I followed this documentation:
https://github.com/protocolbuffers/protobuf/blob/v3.7.1/src/README.md
And with the ./configure --disable-shared parameter, the protoc file size generated by make install is 67MB, which is much larger than the exe file on maven repo.
I would like to ask how to manually generate the pre-built files in the maven repo?

Thanks a lot!

Describe the solution you'd like
Manually generate the following files by myself:
https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.7.1/protoc-3.7.1-linux-x86_64.exe

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

@DingliZhang DingliZhang added the untriaged auto added to all issues by default when created. label Apr 21, 2024
@DingliZhang
Copy link
Author

@hlopko Could you give some advice please? Thank you very much.

@zhangskz
Copy link
Member

Is it intentional that you're linking to release / documentation from v3.7.1? This is a very old release, and you should probably move to a supported protobuf version instead: https://protobuf.dev/support/version-support/

Can you elaborate more on why you need to manually generate our prebuilts? Using the artifacts published to maven is recommended.

We generate these artifacts via internally using the protoc_release bazel target and --config=linux-x86_64.

@zhangskz zhangskz added question packaging & distribution protoc and removed untriaged auto added to all issues by default when created. labels Apr 24, 2024
@DingliZhang
Copy link
Author

DingliZhang commented Apr 25, 2024

Is it intentional that you're linking to release / documentation from v3.7.1? This is a very old release, and you should probably move to a supported protobuf version instead: https://protobuf.dev/support/version-support/

Can you elaborate more on why you need to manually generate our prebuilts? Using the artifacts published to maven is recommended.

We generate these artifacts via internally using the protoc_release bazel target and --config=linux-x86_64.

Thank you for your patience and timely response!
Similar to the #14402 issue, but what I'm trying to do is to use the artifacts on RISC-V.
The following error was reported when I build other maven projects on RISC-V:

[ 8292s] [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile (src-compile-protoc) on project hadoop-common: Missing:
[ 8292s] [ERROR] ----------
[ 8292s] [ERROR] 1) com.google.protobuf:protoc:exe:linux-riscv64:3.7.1
[ 8292s] [ERROR] 
[ 8292s] [ERROR]   Try downloading the file manually from the project website.
[ 8292s] [ERROR] 
[ 8292s] [ERROR]   Then, install it using the command: 
[ 8292s] [ERROR]       mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.7.1 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=/path/to/file
[ 8292s] [ERROR] 
[ 8292s] [ERROR]   Alternatively, if you host your own repository you can deploy the file there: 
[ 8292s] [ERROR]       mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.7.1 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ 8292s] [ERROR] 
[ 8292s] [ERROR]   Path to dependency: 
[ 8292s] [ERROR]   	1) org.apache.hadoop:hadoop-common:jar:3.3.6
[ 8292s] [ERROR]   	2) com.google.protobuf:protoc:exe:linux-riscv64:3.7.1

It seems that the latest version is also not released for RISC-V, so I had to follow the prompts and build manually.
Thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants