Fix our clock_gettime detection with XCode 8

RESOLVED DUPLICATE of bug 1303212

Status

RESOLVED DUPLICATE of bug 1303212
2 years ago
8 months ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
OSX 10.12 now has clock_gettime(), and building with XCode 8 makes us believe that we can use this function, but the problem is that we're using AC_TRY_LINK.  This symbol is resolved as a weak symbol so the linking succeeds, but if you try to run the resulting binary, you get something like this:

$ ./conftest
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
  Referenced from: /Users/ehsan/src/spidernode/./conftest (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
  Referenced from: /Users/ehsan/src/spidernode/./conftest (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib

Trace/BPT trap: 5

Using AC_TRY_RUN enables us to correctly detect the availability of this symbol.
(Assignee)

Comment 1

2 years ago
Created attachment 8795337 [details] [diff] [review]
Do not get tricked into believing that clock_gettime is available when building with XCode 8 on OSX 10.11 and lower
Attachment #8795337 - Flags: review?(gps)
See Also: → bug 1303212
Is this not just a dupe of bug 1303212?
(Assignee)

Comment 3

2 years ago
It is...  Bugzilla search apparently ignored all comments.  :(
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1303212

Comment 4

2 years ago
Comment on attachment 8795337 [details] [diff] [review]
Do not get tricked into believing that clock_gettime is available when building with XCode 8 on OSX 10.11 and lower

Bug marked as dupe.
Attachment #8795337 - Flags: review?(gps)

Updated

8 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.