This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch branch-3.6
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git
The following commit(s) were added to refs/heads/branch-3.6 by this push:
new 80b9764 Fix conflicts with other python libraries due to static link
to libstdc++ (#244)
80b9764 is described below
commit 80b9764ad9f875955db39fb4c0e3445b7863cdd7
Author: Yunze Xu <[email protected]>
AuthorDate: Sat Feb 8 11:44:10 2025 +0800
Fix conflicts with other python libraries due to static link to libstdc++
(#244)
Fixes https://github.com/apache/pulsar-client-python/issues/242
Fixes https://github.com/apache/pulsar-client-python/issues/243
Fixes https://github.com/apache/pulsar-client-python/issues/245
Add a patch to avoid linking to libgcc and libstdc++.
(cherry picked from commit 4a4ac3f23ec6129c80a6eef8bc01046a7259b6a9)
---
pkg/build-wheel-inside-docker.sh | 4 ++++
pkg/manylinux2014/pulsar-client-cpp-3.7.0.patch | 13 +++++++++++++
2 files changed, 17 insertions(+)
diff --git a/pkg/build-wheel-inside-docker.sh b/pkg/build-wheel-inside-docker.sh
index 2aac91f..d3cd6e5 100755
--- a/pkg/build-wheel-inside-docker.sh
+++ b/pkg/build-wheel-inside-docker.sh
@@ -21,6 +21,7 @@
set -e -x
cd /pulsar-client-python
+ROOT_DIR=$PWD
source build-support/dep-url.sh
# Build cpp wheels
@@ -46,6 +47,9 @@ if [ $CPP_BINARY_TYPE == "rpm" ]; then
cd ..
./bootstrap-vcpkg.sh
cd ..
+ if [ $PULSAR_CPP_VERSION == "3.7.0" ]; then
+ patch lib/CMakeLists.txt
$ROOT_DIR/pkg/manylinux2014/pulsar-client-cpp-3.7.0.patch
+ fi
cmake -B build-cpp -DINTEGRATE_VCPKG=ON -DCMAKE_BUILD_TYPE=Release
-DBUILD_TESTS=OFF -DBUILD_DYNAMIC_LIB=ON -DBUILD_STATIC_LIB=ON
cmake --build build-cpp -j8 --target install
cd ..
diff --git a/pkg/manylinux2014/pulsar-client-cpp-3.7.0.patch
b/pkg/manylinux2014/pulsar-client-cpp-3.7.0.patch
new file mode 100644
index 0000000..e16f8e9
--- /dev/null
+++ b/pkg/manylinux2014/pulsar-client-cpp-3.7.0.patch
@@ -0,0 +1,13 @@
+--- lib/CMakeLists.txt
++++ lib/CMakeLists.txt
+@@ -93,10 +93,6 @@
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ target_link_options(pulsarShared PRIVATE -Wl,-Bsymbolic)
+ endif ()
+- check_cxx_symbol_exists(__GLIBCXX__ iostream GLIBCXX)
+- if (GLIBCXX)
+- target_link_libraries(pulsarShared PUBLIC -static-libgcc
-static-libstdc++)
+- endif ()
+ endif()
+
+ check_cxx_symbol_exists(getauxval sys/auxv.h HAVE_AUXV_GETAUXVAL)