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

Can't build libbson on tvOS / watchOS

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.0
    • Affects Version/s: 1.6.0
    • Component/s: libbson, packaging
    • Labels:
      None
    • Environment:
      tvOS, watchOS

      I maintain the CocoaPods package for libbson. The goal is to make libbson easy to integrate into Objective-C and Swift projects.

      By default CocoaPods builds for iOS, OS X, tvOS, and watchOS. When running test builds on tvOS and watchOS, I get errors related to syscall not being available:

          - ERROR | [tvOS] xcodebuild:  /Users/pnm/code/libbson/src/bson/bson-context.c:53:11: error: 'syscall' is unavailable: not available on tvOS
          - NOTE  | [tvOS] xcodebuild:  /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator10.1.sdk/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked unavailable here
          - ERROR | [watchOS] xcodebuild:  /Users/pnm/code/libbson/src/bson/bson-context.c:53:11: error: 'syscall' is unavailable: not available on watchOS
          - NOTE  | [watchOS] xcodebuild:  /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator3.1.sdk/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked unavailable here
      

      The challenge is that the package has to be shared between these OS's. There's a script that runs autogen and configure at install time, though at that point the platforms it will run on are not known (and have different support).

      What's the best way to handle this? Should I add more checks in bson-context.c?

            Assignee:
            Unassigned Unassigned
            Reporter:
            paulmelnikow Paul Melnikow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: