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

Include CMake package files with GRPC and protobuf devel RPMs #3488

Open
rjjkm opened this issue Aug 4, 2022 · 3 comments
Open

Include CMake package files with GRPC and protobuf devel RPMs #3488

rjjkm opened this issue Aug 4, 2022 · 3 comments

Comments

@rjjkm
Copy link

rjjkm commented Aug 4, 2022

The GRPC and protobuf devel RPMs include only pkg-config files. Is there a specific reason why the CMake package files are not included?

Building GRPC and protobuf applications with CMake is greatly simplified by using the protobuf_generate function included in protobuf-config.cmake.

Not sure what the overall strategy is, I see CMake package files included when installing other libraries. Seems if a library generates CMake package files they should be included with the RPM.

Thank you

@oliviacrain
Copy link
Contributor

Thanks for your patience here. We definitely want to package these CMake files if it greatly simplifies development for you.

This was fixed for grpc in #5719- thanks @reubeno! grpc-devel >= 1.42.0-6 will contain this fix, once released.

Self-assigning to apply a similar change to protobuf.

@oliviacrain oliviacrain self-assigned this Jul 18, 2023
@oliviacrain
Copy link
Contributor

oliviacrain commented Jul 21, 2023

Did a little bit of digging, this is a bit harder than I previously thought due to the version of protobuf we ship.

The main sticking points:

  • We build protobuf using the autotools-based build
  • CMake files are not installed when using an autotools-based build, and there is no way to enable such behavior
  • Support for building protobuf with CMake on Linux is not documented or officially supported for this version
  • There was an issue opened stating CMake and autotools-based builds produced different ABIs when building shared libraries
  • The above two points make it very hard to justify changing our protobuf package to use CMake

So, not much we can do here other than manually configuring and installing the relevant CMake files. I'm not comfortable doing so due to unfamiliarity with CMake, so I'll unassign myself from this bug. Happy to take a PR fixing this. Otherwise, this change will happen in 3.0 when we'll switch to the CMake-based build.

@oliviacrain oliviacrain removed their assignment Jul 21, 2023
@rjjkm
Copy link
Author

rjjkm commented Jul 24, 2023

I can wait for the 3.0 release. Thanks for investigating.

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

2 participants