-
Notifications
You must be signed in to change notification settings - Fork 48
Find libpulsarwithdeps.a when LINK_STATIC is ON #10
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
Find libpulsarwithdeps.a when LINK_STATIC is ON #10
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
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script can be used for both CI verification and local development environment establishment. In future, we can replace this script with vcpkg.
|
@merlimat Let's continue the discussion here. I don't understand well about the advantage of packaging both
|
| cd $ROOT_DIR | ||
|
|
||
| CACHE_DIR=~/.pulsar-python-deps | ||
| if [[ $# -le 1 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if [[ $# -le 1 ]]; then | |
| if [[ $# -ge 1 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry I forgot to push latest commits. I found this issue as well.
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.