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

Android NDK support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 1.8.2
    • 1.9.0
    • cmake, libbson
    • Android NDK r13b+
    • Fully Compatible

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: