You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/12 03:19:07 UTC
[GitHub] [pulsar-client-python] BewareMyPower opened a new pull request, #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
BewareMyPower opened a new pull request, #10:
URL: https://github.com/apache/pulsar-client-python/pull/10
### 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-python] RobertIndie commented on a diff in pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
Posted by GitBox <gi...@apache.org>.
RobertIndie commented on code in PR #10:
URL: https://github.com/apache/pulsar-client-python/pull/10#discussion_r994237429
##########
build-support/install-dependencies.sh:
##########
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -e -x
+
+ROOT_DIR=$(git rev-parse --show-toplevel)
+cd $ROOT_DIR
+
+CACHE_DIR=~/.pulsar-python-deps
+if [[ $# -le 1 ]]; then
Review Comment:
```suggestion
if [[ $# -ge 1 ]]; then
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-python] BewareMyPower commented on pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on PR #10:
URL: https://github.com/apache/pulsar-client-python/pull/10#issuecomment-1275531698
Since the C++ client doesn't have an official macOS release, this PR cannot be verified by CI, unless building the C++ client in the workflow, which is unaccepted, see https://github.com/apache/pulsar-client-python/pull/3#pullrequestreview-1125581221
> Instead we should just fetch the binaries that are already available (eg: RPM, Deb, APK, etc.. ). (Homebrew is a bit a of an exception since it's not statically linked).
This CMakeLists.txt has been verified in the C++ library built with the script in https://github.com/apache/pulsar-client-cpp/pull/38
```bash
$ otool -L _pulsar.so
_pulsar.so:
@rpath/_pulsar.so (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1858.112.0)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.100.19)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
$ python3 -c 'import _pulsar'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-python] BewareMyPower commented on pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on PR #10:
URL: https://github.com/apache/pulsar-client-python/pull/10#issuecomment-1277033670
@merlimat Let's continue the [discussion](https://github.com/apache/pulsar-client-python/pull/11#discussion_r994085749) here. I don't understand well about the advantage of packaging both `libpulsar.so` and `libboost_python.so` (than including `libboost_python.a` and `libpulsarwithdeps.a`).
> If we use the .a, everything is visible and subject to symbols conflict (eg if you load another Python extension that uses this symbols)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-python] BewareMyPower commented on a diff in pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #10:
URL: https://github.com/apache/pulsar-client-python/pull/10#discussion_r994374282
##########
build-support/install-dependencies.sh:
##########
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -e -x
+
+ROOT_DIR=$(git rev-parse --show-toplevel)
+cd $ROOT_DIR
+
+CACHE_DIR=~/.pulsar-python-deps
+if [[ $# -le 1 ]]; then
Review Comment:
Oh, sorry I forgot to push latest commits. I found this issue as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-python] BewareMyPower commented on a diff in pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #10:
URL: https://github.com/apache/pulsar-client-python/pull/10#discussion_r993087941
##########
build-support/install-dependencies.sh:
##########
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
Review Comment:
This script can be used for both CI verification and local development environment establishment. In future, we can replace this script with vcpkg.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-python] BewareMyPower commented on a diff in pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #10:
URL: https://github.com/apache/pulsar-client-python/pull/10#discussion_r993087941
##########
build-support/install-dependencies.sh:
##########
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
Review Comment:
This script can be used both for CI verification and local development environment establishment.
##########
build-support/install-dependencies.sh:
##########
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
Review Comment:
This script can be used for both CI verification and local development environment establishment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-python] BewareMyPower closed pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
Posted by GitBox <gi...@apache.org>.
BewareMyPower closed pull request #10: Find libpulsarwithdeps.a when LINK_STATIC is ON
URL: https://github.com/apache/pulsar-client-python/pull/10
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org