[MacPorts] #68731: pinentry-mac does not build with Xcode 15

MacPorts noreply at macports.org
Sun May 26 10:46:37 UTC 2024


#68731: pinentry-mac does not build with Xcode 15
---------------------------+--------------------
  Reporter:  szhorvat      |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:
Resolution:                |   Keywords:
      Port:  pinentry-mac  |
---------------------------+--------------------

Comment (by FlyingSamson):

 OK, thank you, for that explanation! I wasn't aware of that.

 I searched around a bit and found that port `Sequal-Ace` seemed to have
 faced a similar issue, in the case that the macOS version was behind the
 SDK version (the portfile gives the example of macOS 10.15 running Xcode
 12). Similarly, Szabolcs, Dave, and myself see the problem in this ticket
 when building on macOS 13 using Xcode 15, which in therory provides SDK 14
 but the build still uses SDK 13 matching the OS version.

 I tried applying the workaround used in `Sequel-Ace`:
 {{{
 pre-configure {
     # This port really needs to use the Xcode SDK, not CLT SDK for some
     # currently unknown reason.
     #
     # With the base logic in portconfigure.tcl there is currently no way
 to
     # force the selection of an Xcode SDK in the case that Xcode has
 something
     # newer than the OS: e.g. macOS 10.15 running Xcode 12 will never
 choose
     # Xcode's MacOSX11.0.sdk and will always choose the CLT
 MacOSX10.15.sdk.
     #
     # There is no consensus on what can or should be done about this; see
     # https://lists.macports.org/pipermail/macports-
 dev/2020-November/042621.html
     #
     # Thus we do this hacky thing: at runtime choose the best Xcode SDK
     # possible.
     if {[catch {exec xcrun --sdk macosx${configure.sdk_version} --show-
 sdk-path 2> /dev/null} sdk]} {
         ui_debug "Failed to find Xcode SDK for
 macosx${configure.sdk_version}; trying macosx"
         catch {exec xcrun --sdk macosx --show-sdk-path 2> /dev/null} sdk
     }
     if {${sdk} ne ""} {
         ui_debug "Found Xcode SDK ${sdk}"
         configure.sdkroot  ${sdk}
     }
 }
 }}}

 which indeed also fixed building `pinentry-mac` (i.e., this ticket).

 While I kind of understand that this fixes the issue, I do not understand
 how this is not required by all the other ports using the `xcode`
 portgroup for building.
 This makes me think that there must be more to the problem with `pinentry-
 mac`.

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


More information about the macports-tickets mailing list