-
Notifications
You must be signed in to change notification settings - Fork 116
Avoid breakages for WITH_LLVM builds with libprotobuf < 3.19.0 #200
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
Conversation
This fixes #193 for WITH_LLVM builds. Tested on Ubuntu 20.04 with libprotoc 3.6.1 and on Debian 6.6.15 with libprotoc 3.21.12. I did have to install |
Recent commit 623c777 introduced spe_tid_pid_provider, which includes `repeated_ptr_field.h` (`RepeatedPtrField` was only moved to its own header in 3.19.0). `repeated_field.h` transitively includes `repeated_ptr_field` in new versions of libprotobuf for backwards compatibility reasons, so we can include that instead.
Using the WITH_LLVM option on Ubuntu 20.04, I am unable to build with the cmake installed from the repository.
Can you confirm the version of cmake on your Ubuntu 20.04 machine? Also should we bump the supported system to Ubuntu 22.04? |
Yes, cmake package is stuck with 3.16.3 for ubuntu 20.04. And there is no easy way around it except to build/install by oneself. Tried build with 22.04 LTS, it builds successfully. The protobuf installed is libprotobuf-dev 3.12.4.
Since this is a restriction enforced by llvm and we are building on top of llvm, I think it is reasonable to align with llvm's decision. Thanks for the fix. |
The version of cmake I used was 3.29.6. The default on Ubuntu 20.04 is 3.16.3, but now that Kitware maintains APT repositories for different Ubuntu versions, upgrading is as simple as:
I'm good with bumping the officially supported version of Ubuntu to 22.04, but it would be helpful for 20.04 users to know that all they have to do is update cmake. |
I was able to verify the fix on my Ubuntu 22.04 VM. I see that the @shenhanc78 I think we should make the failure clearer by setting
Good idea, I'll note this for Ubuntu 20.04 systems when I update the README. I'll go ahead and merge this. |
Recent commit 623c777 introduced spe_tid_pid_provider, which includes
repeated_ptr_field.h
(RepeatedPtrField
was only moved to its ownheader in 3.19.0).
repeated_field.h
transitively includesrepeated_ptr_field
in newversions of libprotobuf for backwards compatibility reasons, so we can
include that instead.