-
Notifications
You must be signed in to change notification settings - Fork 67
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
Fix build failure with the Protobuf 23.3 #290
Fix build failure with the Protobuf 23.3 #290
Conversation
1b4adae
to
53ca69d
Compare
In this way, the macOS developer needs to use C++ 17 to compile this project. We need to update README. |
Yes. BTW, I think we can make C++17 as the default standard for macOS users because it's now required by the library dependency, not the test dependency. I marked this PR as drafted first. |
### Motivation The current CMakeLists.txt does not work with the latest Protobuf (23.3.0). It's because currently the Module mode is used to find Protobuf, while the `FindProtobuf.cmake` is not updated to find the Abseil dependency. See protocolbuffers/protobuf#12292 (comment) ### Modifications For macOS, use the Config mode to find Protobuf. It's because in other systems, the Module mode works well. Besides, enable `PROTOBUF_USE_DLLS` as a workaround for protocolbuffers/protobuf#12983 is not released. Pin the default C++ standard to 17 for macOS so that users don't need to set the C++ standard manually.
53ca69d
to
e09cb53
Compare
@shibd I've updated the README and pinned the C++ standard to 17 for macOS so that we don't need to set |
### Modifications Upgrade the C++ client to 3.3.0 and deprecate the `log_conf_file_path` config due to apache/pulsar-client-cpp#283. There is another issue that after apache/pulsar-client-cpp#290, the CMakeLists.txt from the C++ client finds the protobuf package with config mode. To fix it, install the OpenSSL via CMake instead of the autotools.
### Modifications Upgrade the C++ client to 3.3.0 and deprecate the `log_conf_file_path` config due to apache/pulsar-client-cpp#283. There is another issue that after apache/pulsar-client-cpp#290, the CMakeLists.txt from the C++ client finds the protobuf package with config mode. To fix it, install the OpenSSL via CMake instead of the autotools.
### Modifications Upgrade the C++ client to 3.3.0 and deprecate the `log_conf_file_path` config due to apache/pulsar-client-cpp#283. There is another issue that after apache/pulsar-client-cpp#290, the CMakeLists.txt from the C++ client finds the protobuf package with config mode. To fix it, install the OpenSSL via CMake instead of the autotools.
…n macOS ### Motivation apache#290 brings a regression that on macOS, Protobuf is always found with CMake Config mode, which does not set the `Protobuf_LIBRARIES` variable so that the libpulsarwithdeps.a misses the symbols of Protobuf. ### Modifications When `LINK_STATIC` is ON, use CMake Module mode to find the Protobuf. Add `build-static-library.sh` to build libraries with static dependencies and verify these libraries in PR workflow. Upload the pre-built binaries in the build workflow.
…n macOS ### Motivation apache#290 brings a regression that on macOS, Protobuf is always found with CMake Config mode, which does not set the `Protobuf_LIBRARIES` variable so that the libpulsarwithdeps.a misses the symbols of Protobuf. ### Modifications When `LINK_STATIC` is ON, use CMake Module mode to find the Protobuf. Add `build-static-library.sh` to build libraries with static dependencies and verify these libraries in PR workflow. Upload the pre-built binaries in the build workflow.
…n macOS ### Motivation apache#290 brings a regression that on macOS, Protobuf is always found with CMake Config mode, which does not set the `Protobuf_LIBRARIES` variable so that the libpulsarwithdeps.a misses the symbols of Protobuf. ### Modifications When `LINK_STATIC` is ON, use CMake Module mode to find the Protobuf. Add `build-static-library.sh` to build libraries with static dependencies and verify these libraries in PR workflow. Upload the pre-built binaries in the build workflow.
…n macOS ### Motivation apache#290 brings a regression that on macOS, Protobuf is always found with CMake Config mode, which does not set the `Protobuf_LIBRARIES` variable so that the libpulsarwithdeps.a misses the symbols of Protobuf. ### Modifications When `LINK_STATIC` is ON, use CMake Module mode to find the Protobuf. Add `build-static-library.sh` to build libraries with static dependencies and verify these libraries in PR workflow. Upload the pre-built binaries in the build workflow.
…n macOS ### Motivation apache#290 brings a regression that on macOS, Protobuf is always found with CMake Config mode, which does not set the `Protobuf_LIBRARIES` variable so that the libpulsarwithdeps.a misses the symbols of Protobuf. ### Modifications When `LINK_STATIC` is ON, use CMake Module mode to find the Protobuf. Add `build-static-library.sh` to build libraries with static dependencies and verify these libraries in PR workflow. Upload the pre-built binaries in the build workflow.
…n macOS (#354) ### Motivation #290 brings a regression that on macOS, Protobuf is always found with CMake Config mode, which does not set the `Protobuf_LIBRARIES` variable so that the libpulsarwithdeps.a misses the symbols of Protobuf. ### Modifications When `LINK_STATIC` is ON, use CMake Module mode to find the Protobuf. Add `build-static-library.sh` to build libraries with static dependencies and verify these libraries in PR workflow. Upload the pre-built binaries in the build workflow.
…n macOS (#354) ### Motivation #290 brings a regression that on macOS, Protobuf is always found with CMake Config mode, which does not set the `Protobuf_LIBRARIES` variable so that the libpulsarwithdeps.a misses the symbols of Protobuf. ### Modifications When `LINK_STATIC` is ON, use CMake Module mode to find the Protobuf. Add `build-static-library.sh` to build libraries with static dependencies and verify these libraries in PR workflow. Upload the pre-built binaries in the build workflow. (cherry picked from commit f75b39b)
Motivation
The current CMakeLists.txt does not work with the latest Protobuf (23.3.0). It's because currently the Module mode is used to find Protobuf, while the
FindProtobuf.cmake
is not updated to find the Abseil dependency.See protocolbuffers/protobuf#12292 (comment)
Modifications
For macOS, use the Config mode to find Protobuf. It's because in other systems, the Module mode works well. Besides, enable
PROTOBUF_USE_DLLS
as a workaround forprotocolbuffers/protobuf#12983 is not released.
Pin the default C++ standard to 17 for macOS so that users don't need to set the C++ standard manually.
Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)