Build on Intel-based macOS with statically linked dependencies#38
Closed
BewareMyPower wants to merge 3 commits intoapache:mainfrom
Closed
Build on Intel-based macOS with statically linked dependencies#38BewareMyPower wants to merge 3 commits intoapache:mainfrom
BewareMyPower wants to merge 3 commits intoapache:mainfrom
Conversation
8b715c9 to
bb293de
Compare
### Motivation When we build Python or Node.js clients based on the C++ client, it's better to link dependencies statically so that they don't need to link 3rd party dependencies. There is an existing script to build Python wheel on macOS: https://github.com/apache/pulsar-client-python/blob/main/build-mac-wheels.sh However, it's still based on the previous Pulsar main repo. There is no script to build the statically linked C++ client currently. ### Modifications Add `mac-intel-build.sh` to build C++ client with statically linked dependencies. It should be noted that this script only applies the Intel-based macOS currently. Then verify this script on a macOS 11 GitHub runner, whose architecture is also x86.
bb293de to
ec91c1b
Compare
Contributor
Author
|
@merlimat @Demogorgon314 Could you take a look? Since I don't have a ARM based mac now, I cannot verify the universal build. But I believe it could be simply done based on this patch. Just change export CFLAGS="-fPIC -arch x86_64 -mmacosx-version-min=10.15"to export CFLAGS="-fPIC -arch x86_64 -arch arm64 -mmacosx-version-min=10.15"for dependencies other than OpenSSL. For OpenSSL, build another library with |
Contributor
Author
|
Close this PR since we cannot use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When we build Python or Node.js clients based on the C++ client, it's better to link dependencies statically so that they don't need to link 3rd party dependencies.
There is an existing script to build Python wheel on macOS:
https://github.com/apache/pulsar-client-python/blob/main/build-mac-wheels.sh
However, it's still based on the previous Pulsar main repo. There is no script to build the statically linked C++ client currently.
Modifications
Add
mac-intel-build.shto build C++ client with statically linked dependencies. It should be noted that this script only applies the Intel-based macOS currently.Then verify this script on a macOS 11 GitHub runner, whose architecture is also x86.
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)