Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2407

Android NDK support

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: 1.8.2
    • Component/s: cmake, libbson
    • Environment:
      Android NDK r13b+
    • Fully Compatible

      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

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jeanmarc.leroux Jean-Marc Le Roux
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: