BewareMyPower commented on issue #512:
URL:
https://github.com/apache/pulsar-client-cpp/issues/512#issuecomment-3411570061
The workaround is not to use `ar -x` to extract `*.a` files to `*.o` files.
For example, on macOS, the following trick works:
```diff
diff --git a/build-support/merge_archives.sh
b/build-support/merge_archives.sh
index 065130d..d7e3c53 100755
--- a/build-support/merge_archives.sh
+++ b/build-support/merge_archives.sh
@@ -20,6 +20,7 @@
set -e
+ROOT="$pwd/.."
MERGED_LIBRARY=$1
shift
ITEMS=$*
@@ -44,7 +45,9 @@ for ITEM in $ITEMS; do
LIBS="$LIBS $LIB_NAME/*.o"
cd ..
done
+LIBS="$LIBS
$ROOT/vcpkg/buildtrees/roaring/arm64-osx-dbg/src/CMakeFiles/roaring.dir/bitset.c.o"
+set -x
ar -qc $MERGED_LIBRARY $LIBS
```
P.S. Change `dbg` to `rel` in release.
However, it's a bit complicated that we need to write a new script to scan
dependencies under the `vcpkg/buildtrees` directory. In addition, the build on
Windows is different that I don't have time to verify if the Windows library
has the same issue.
A quick fix is to remove the libroaring dependency and use an alternative
for `Roaring64Map` from libroaring for now. /cc @shibd
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]