[CDRIVER-2631] cmake adds links to librt on android Created: 27/Apr/18  Updated: 28/Oct/23  Resolved: 04/May/18

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.10.0

Type: Bug Priority: Major - P3
Reporter: Gabriel Russell (Inactive) Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.



 Comments   
Comment by Githook User [ 04/May/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2631 don't use -lrt on android
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/4fa4a19719c466a33960dea1ea9910b5ce52ed17

Generated at Wed Feb 07 21:15:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.