[MacPorts] #57588: postgresql10, postgresql11: Undefined symbols _clock_gettime (was: postgresql10: Undefined symbols _clock_gettime)

MacPorts noreply at macports.org
Sat Dec 8 15:09:55 UTC 2018


#57588: postgresql10, postgresql11: Undefined symbols _clock_gettime
-----------------------------------------+----------------------------
  Reporter:  ryandesign                  |      Owner:  jyrkiwahlstedt
      Type:  defect                      |     Status:  assigned
  Priority:  Normal                      |  Milestone:
 Component:  ports                       |    Version:
Resolution:                              |   Keywords:  elcapitan
      Port:  postgresql10, postgresql11  |
-----------------------------------------+----------------------------
Changes (by ryandesign):

 * keywords:   => elcapitan
 * port:  postgresql10 => postgresql10, postgresql11


Comment:

 I was wrong: this problem only affects 10.11. Postgresql appears to
 already have a way of dealing with the lack of `clock_gettime`, but even
 though it was introduced in 10.12, it thinks it is available on 10.11.

 The reason for this is that the configure script uses the latest SDK, even
 though we did not tell it to do that. The latest Xcode on 10.11 includes
 the 10.12 SDK. The configure script gets the path of the latest SDK from
 `xcodebuild` and adds it to `CPPFLAGS` in the form of an `-isysroot` flag,
 which explains why the configure script detects that `clock_gettime` is
 available. But it neglects to also add the SDK path to `LDFLAGS` in the
 form of a `-syslibroot` flag, which is why it fails at link time.

 Trying to add the legacysupport portgroup fails because of conflicting
 definitions of `clock_gettime` between the legacy support headers and the
 10.12 SDK's definition. But since postgresql already knows how to deal
 with the lack of `clock_gettime`, we should not add this portgroup.

 Probably the best solution is explain to postgresql that it should not
 attempt to make its own decisions about which SDK to use, which I will
 commit in a moment. MacPorts already adds `-isysroot` and `-syslibroot`
 flags when required.

-- 
Ticket URL: <https://trac.macports.org/ticket/57588#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list