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

cmake adds links to librt on android

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      https://github.com/mongodb/mongo-c-driver/blob/8ff2b68b57bb57a8bc66a368c14c88d77356d8f3/CMakeLists.txt#L530

      librt as well as libpthred are integrated in to libc on android and don't exist independently.

      Changing

      if (UNIX AND NOT APPLE)
         set (SHM_LIB -lrt)
      endif ()
      

      to

      if (UNIX AND NOT APPLE AND NOT ANDROID)
         set (SHM_LIB -lrt)
      endif ()
      

      worked for me.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: