@@ -24,18 +24,32 @@ cd /pulsar-client-python
2424source build-support/dep-url.sh
2525
2626# Build cpp wheels
27+ if [[ $ARCH == " aarch64" ]]; then
28+ export VCPKG_FORCE_SYSTEM_BINARIES=1
29+ fi
2730PULSAR_CPP_VERSION=$( cat ./dependencies.yaml | grep pulsar-cpp | awk ' {print $2}' )
2831
2932if [ $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)
3953else # apk
4054 if [ $ARCH == " aarch64" ]; then
4155 APK_ROOT_DIR=$( pulsar_cpp_base_url $PULSAR_CPP_VERSION ) /apk-arm64/aarch64
0 commit comments