[MacPorts] #74310: pre-configure and post-configure phases should set SDKROOT environment variable

MacPorts noreply at macports.org
Mon Aug 10 21:41:07 UTC 2026


#74310: pre-configure and post-configure phases should set SDKROOT environment
variable
---------------------+----------------------
  Reporter:  breun   |      Owner:  jmroot
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  base    |    Version:
Resolution:          |   Keywords:
      Port:          |
---------------------+----------------------

Comment (by breun):

 My use case is a PortGroup using `pre-configure` to make sure that the
 Metal toolchain is set up correctly for use with MacPorts (see
 [https://github.com/macports/macports-ports/pull/33777 #33777]). I would
 need `xcrun` commands via `system` in `pre-configure` to see the same
 `SDKROOT` environment variable as code that will run later from
 `configure`, because otherwise the logic might be unable to correctly
 determine whether the Metal toolchain is set up correctly for MacPorts.

 As a workaround I could let my PortGroup explicitly set `SDKROOT` to
 `configure.sdkroot` for its logic, but if MacPorts would set `SDKROOT` for
 commands run via `system` in `pre-configure`, then that would not be
 needed.

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


More information about the macports-tickets mailing list