MacPorts
2018-09-17 10:25:52 UTC
#57137: xcode portgroup should set -derivedDataPath on Xcode versions that need it
-------------------------+---------------------------
Reporter: ryandesign | Owner: (none)
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: xcode-1.0.tcl
-------------------------+---------------------------
Ports that use the xcode 1.0 portgroup fail to build at least on Xcode 9.4
and 10.0 GM, because they cannot write to the derived data path. By
default Xcode uses a derived data path inside the home directory, but
fails to honor the `HOME` environment variable MacPorts specifies, so it
tries to write into the macports user's home directory which is not
writable.
To work around this, the poedit port manually specifies the derived data
path, and I copied this usage to the MoltenVK port when I created it, but
every other port that builds with xcodebuild (such a graphviz-gui or
Readown) has failed to build for me in the same way, so I think we need to
move that fix into the portgroup.
It looks like the `-derivedDataPath` flag is available in xcodebuild 5 and
later (Mountain Lion and later). So we could add the flag for Xcode 5 and
later, assuming it does no harm, though surely these ports haven't been
broken since Mountain Lion. I suspect some new version of Xcode must have
introduced a change. Do we know what version that might be?
-------------------------+---------------------------
Reporter: ryandesign | Owner: (none)
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: xcode-1.0.tcl
-------------------------+---------------------------
Ports that use the xcode 1.0 portgroup fail to build at least on Xcode 9.4
and 10.0 GM, because they cannot write to the derived data path. By
default Xcode uses a derived data path inside the home directory, but
fails to honor the `HOME` environment variable MacPorts specifies, so it
tries to write into the macports user's home directory which is not
writable.
To work around this, the poedit port manually specifies the derived data
path, and I copied this usage to the MoltenVK port when I created it, but
every other port that builds with xcodebuild (such a graphviz-gui or
Readown) has failed to build for me in the same way, so I think we need to
move that fix into the portgroup.
It looks like the `-derivedDataPath` flag is available in xcodebuild 5 and
later (Mountain Lion and later). So we could add the flag for Xcode 5 and
later, assuming it does no harm, though surely these ports haven't been
broken since Mountain Lion. I suspect some new version of Xcode must have
introduced a change. Do we know what version that might be?
--
Ticket URL: <https://trac.macports.org/ticket/57137>
MacPorts <https://www.macports.org/>
Ports system for macOS
Ticket URL: <https://trac.macports.org/ticket/57137>
MacPorts <https://www.macports.org/>
Ports system for macOS