Find libpulsarwithdeps.a when LINK_STATIC is ON#10
Closed
BewareMyPower wants to merge 2 commits intoapache:mainfrom
Closed
Find libpulsarwithdeps.a when LINK_STATIC is ON#10BewareMyPower wants to merge 2 commits intoapache:mainfrom
BewareMyPower wants to merge 2 commits intoapache:mainfrom
Conversation
6775af7 to
2a797a3
Compare
### Motivation Currently when LINK_STATIC is ON, Python client will still find libpulsar.a, which doesn't include the 3rd party dependencies of C++ client. In this case, we have to find those libraries. A simple way is to link statically to libpulsarwithdeps.a, which already contains all the dependencies of C++ client. ### Modifications Find libpulsarwithdeps.a when LINK_STATIC is ON. For macOS, the statically linked libcurl depends on the Foundation and SystemConfiguration frameworks, so the related compile options are added. In addition, a `LINK_OPENSSL` option is also added because the old C++ client doesn't link to OpenSSL statically so that `libpulsarwithdeps.a` doesn't contain OpenSSL. For new C++ client releases, there is no need to enable this option.
091f45e to
bd19c63
Compare
Merged
BewareMyPower
commented
Oct 12, 2022
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # |
Contributor
Author
There was a problem hiding this comment.
This script can be used for both CI verification and local development environment establishment. In future, we can replace this script with vcpkg.
Contributor
Author
|
@merlimat Let's continue the discussion here. I don't understand well about the advantage of packaging both
|
RobertIndie
requested changes
Oct 13, 2022
| cd $ROOT_DIR | ||
|
|
||
| CACHE_DIR=~/.pulsar-python-deps | ||
| if [[ $# -le 1 ]]; then |
Member
There was a problem hiding this comment.
Suggested change
| if [[ $# -le 1 ]]; then | |
| if [[ $# -ge 1 ]]; then |
Contributor
Author
There was a problem hiding this comment.
Oh, sorry I forgot to push latest commits. I found this issue as well.
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
Currently when LINK_STATIC is ON, Python client will still find libpulsar.a, which doesn't include the 3rd party dependencies of C++ client. In this case, we have to find those libraries.
A simple way is to link statically to libpulsarwithdeps.a, which already contains all the dependencies of C++ client.
Modifications
Find libpulsarwithdeps.a when LINK_STATIC is ON. For macOS, the statically linked libcurl depends on the Foundation and SystemConfiguration frameworks, so the related compile options are added.