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

Fix Protobuf symbols not found in libpulsarwithdeps.a when building on macOS #354

Merged

Conversation

BewareMyPower
Copy link
Contributor

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.

@BewareMyPower BewareMyPower added this to the 3.4.1 milestone Nov 21, 2023
@BewareMyPower BewareMyPower self-assigned this Nov 21, 2023
@BewareMyPower BewareMyPower force-pushed the bewaremypower/fix-macos-static-build branch from 5eefb7f to 8925794 Compare November 21, 2023 08:32
@BewareMyPower BewareMyPower marked this pull request as draft November 21, 2023 08:42
@BewareMyPower BewareMyPower force-pushed the bewaremypower/fix-macos-static-build branch 2 times, most recently from 2524c55 to fdd3069 Compare November 21, 2023 11:09
@BewareMyPower BewareMyPower marked this pull request as ready for review November 21, 2023 11:11
…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.
@BewareMyPower BewareMyPower force-pushed the bewaremypower/fix-macos-static-build branch from fdd3069 to a5dc8a6 Compare November 21, 2023 11:23
@BewareMyPower
Copy link
Contributor Author

I ran a workflow to generate macOS artifacts here: https://github.com/BewareMyPower/pulsar-client-cpp/actions/runs/6943109321

You can check https://github.com/apache/pulsar-client-cpp/wiki/Verify-the-candidate-release-in-your-local-env#macos-users for how to use it. These artifacts will be included in the next candidate release.

@BewareMyPower BewareMyPower added the bug Something isn't working label Nov 21, 2023
@BewareMyPower BewareMyPower merged commit f75b39b into apache:main Nov 21, 2023
12 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/fix-macos-static-build branch November 21, 2023 12:45
BewareMyPower added a commit that referenced this pull request Nov 21, 2023
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants