Closed Bug 1305738 Opened 8 years ago Closed 8 years ago

Fix our clock_gettime detection with XCode 8

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1303212

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

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.
Is this not just a dupe of bug 1303212?
It is...  Bugzilla search apparently ignored all comments.  :(
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
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)
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: