Skip to content

Commit 6bfdb10

Browse files
Upgrade the C++ client to 3.7.0 (#237)
1 parent fb4523b commit 6bfdb10

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

dependencies.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# under the License.
1818
#
1919

20-
pulsar-cpp: 3.5.1
20+
pulsar-cpp: 3.7.0
2121
pybind11: 2.10.1
2222
# The OpenSSL dependency is only used when building Python from source
2323
openssl: 1.1.1q

pkg/build-wheel-inside-docker.sh

+23-9
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,32 @@ cd /pulsar-client-python
2424
source build-support/dep-url.sh
2525

2626
# Build cpp wheels
27+
if [[ $ARCH == "aarch64" ]]; then
28+
export VCPKG_FORCE_SYSTEM_BINARIES=1
29+
fi
2730
PULSAR_CPP_VERSION=$(cat ./dependencies.yaml | grep pulsar-cpp | awk '{print $2}')
2831

2932
if [ $CPP_BINARY_TYPE == "rpm" ]; then
30-
if [ $ARCH == "aarch64" ]; then
31-
RPM_ROOT_DIR=$(pulsar_cpp_base_url $PULSAR_CPP_VERSION)/rpm-arm64/aarch64
32-
else
33-
RPM_ROOT_DIR=$(pulsar_cpp_base_url $PULSAR_CPP_VERSION)/rpm-x86_64/x86_64
34-
fi
35-
curl -O -L $RPM_ROOT_DIR/apache-pulsar-client-$PULSAR_CPP_VERSION-1.$ARCH.rpm
36-
curl -O -L $RPM_ROOT_DIR/apache-pulsar-client-devel-$PULSAR_CPP_VERSION-1.$ARCH.rpm
37-
curl -O -L $RPM_ROOT_DIR/apache-pulsar-client-debuginfo-$PULSAR_CPP_VERSION-1.$ARCH.rpm
38-
rpm -ivh *.rpm
33+
# The pre-built RPM packages have incompatible ABI with manylinux2014, so we have to build from source
34+
download_dependency ./dependencies.yaml pulsar-cpp
35+
cd apache-pulsar-client-cpp-${PULSAR_CPP_VERSION}
36+
37+
git clone https://github.com/microsoft/vcpkg.git
38+
cd vcpkg
39+
40+
# manylinux2014 does not have ninja in the system package manager
41+
git clone https://github.com/ninja-build/ninja.git
42+
cd ninja
43+
git checkout release
44+
./configure.py --bootstrap
45+
mv ninja /usr/bin/
46+
cd ..
47+
./bootstrap-vcpkg.sh
48+
cd ..
49+
cmake -B build-cpp -DINTEGRATE_VCPKG=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_DYNAMIC_LIB=ON -DBUILD_STATIC_LIB=ON
50+
cmake --build build-cpp -j8 --target install
51+
cd ..
52+
rm -rf apache-pulsar-client-cpp-$(PULSAR_CPP_VERSION)
3953
else # apk
4054
if [ $ARCH == "aarch64" ]; then
4155
APK_ROOT_DIR=$(pulsar_cpp_base_url $PULSAR_CPP_VERSION)/apk-arm64/aarch64

pkg/manylinux2014/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ ENV PATH="/opt/python/${PYTHON_SPEC}/bin:${PATH}"
3232
ENV ARCH=${ARCH}
3333

3434
RUN pip3 install setuptools
35+
# Dependencies for vcpkg on arm64 architecture
36+
RUN yum install -y curl zip unzip tar perl-IPC-Cmd

0 commit comments

Comments
 (0)