[MacPorts] TahoeProblems modified
MacPorts Wiki
noreply at macports.org
Wed Aug 19 22:40:09 UTC 2026
Page "TahoeProblems" was changed by breun
Diff URL: <https://trac.macports.org/wiki/TahoeProblems?action=diff&version=12>
Revision 12
Comment: Improve Metal toolchain section
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: TahoeProblems
=========================================================================
--- TahoeProblems (version: 11)
+++ TahoeProblems (version: 12)
@@ -33,30 +33,50 @@
A number of MacPorts portfiles and MacPorts base assume that arm64 Macs will have Rosetta 2 installed; you will likely run into issues if you have not installed it. Note that Rosetta 2 is not installed by default, or when running x86_64 binaries from the command line — you must open an application that has only x86_64 code in it to get the prompt to install Rosetta 2, or run {{{softwareupdate --install-rosetta}}} in a terminal window.
== Metal toolchain is no longer bundled in Xcode ==
-Xcode 26 no longer bundles the Metal toolchain. Some ports, at least {{{qt6-qtwebengine}}}, do require it and will thus fail to build. The solution is to ensure that MacPorts has been updated to 2.11.6, and to install the Metal toolchain separately:
+Since Xcode 26 the Metal toolchain is an optional component.
+Ports that require the Metal toolchain to build (at least `qt6-qtwebengine`, `openjdk17`, `openjdk21`, `openjdk25` and `openjdk26`) will thus fail to build if the Metal toolchain is not set up correctly for the MacPorts user.
+
+Port maintainers that maintain ports that require the Metal toolchain to build are encouraged to adopt the new `metal` PortGroup for these ports.
+The `metal` PortGroup checks if the Metal toolchain is set up correctly, attempts to correct the setup, and provides an actionable error message when the Metal toolchain setup cannot be fixed automatically.
+
+MacPorts users need to ensure that MacPorts has been updated to at least 2.11.6, and will need to install the Metal toolchain component:
{{{
sudo port selfupdate
xcodebuild -downloadComponent MetalToolchain
}}}
-Alone, that doesn't work out-of-the-box at least with Xcode 26.0.1 and MacPorts 2.11.6. A few additional steps are needed after installing the toolchain with the command given above:
+Then verify that the Metal toolchain component has status `installed`:
-on x86_64 only—note that this command may show a “Usage:” line, which is fine:
+{{{
+❯ xcodebuild -showComponent MetalToolchain
+(...)
+Status: installed
+(...)
+}}}
+
+Also verify that the MacPorts user is able to execute it to report the Metal toolchain version:
+
+{{{
+sudo --user=macports xcrun metal --version
+}}}
+
+If the command above returns an error, try killing the xcrun cache for the MacPorts user (it will be recreated), and test again:
+
+{{{
+sudo --user=macports xcrun --kill-cache
+sudo --user=macports xcrun metal --version
+}}}
+
+If the MacPorts user still cannot execute Metal to report its version, on x86_64 only, try this—note that this command may show a “Usage:” line, which is fine:
+
{{{
sudo diskutil eject $(xcodebuild -showComponent MetalToolchain | sed -E -n -e 's/^Toolchain Search Path: (.*)$/\1/p')
}}}
-then for all systems:
-{{{
-sudo --user=macports xcodebuild -showComponent MetalToolchain
-sudo rm -f "$(sudo --user=macports getconf DARWIN_USER_TEMP_DIR)/xcrun_db"
-}}}
+Finally, it may be [ticket:73262 necessary] to reboot to really clear the {{{xcrun}}} cache.
-Finally, it may be [ticket:73262 necessary] to reboot to clear {{{xcrun}}} cache.
-
-Shoutout to Mark Mentovai for all his detective work to workaround to resolve this problem! See #73008 for more details.
-
+Shoutout to Mark Mentovai for all his detective work! See #73008 for more details.
== Tickets for Broken Ports ==
-------8<------8<------8<------8<------8<------8<------8<------8<--------
--
Page URL: <https://trac.macports.org/wiki/TahoeProblems>
MacPorts <https://www.macports.org/>
Ports system for macOS
This is an automated message. Someone added your email address to be
notified of changes on 'TahoeProblems' page.
If it was not you, please report to admin at macports.org.
More information about the macports-changes
mailing list