libbson doesn't build with clang from the Android NDK r13b because of the missing `rand_r` symbol.
How to reproduce
docker run -it alexisduque/android-ndk-gradle-docker:latest bash
# following commands must be ran in the docker bash
git clone https://github.com/mongodb/libbson.git
cd libbson
mkdir bin && cd bin
cmake .. -DCMAKE_TOOLCHAIN_FILE:STRING=/opt/android-ndk-r13b/build/cmake/android.toolchain.cmake
make
Fails with error:
bson-context.c:359: error: undefined reference to 'rand_r'
Fix
Working fix available here:
https://github.com/aerys/libbson/tree/fix/android-undefined-rand_r
- related to
-
CDRIVER-2440 BSON_HAVE_RAND_R is not defined for Autotools
- Closed