| | 1 | = macOS Golden Gate Problems = |
| | 2 | |
| | 3 | == General Issues == |
| | 4 | |
| | 5 | First of all, please read [wiki:Migration]. |
| | 6 | |
| | 7 | Check the status of Golden Gate builders [https://build.macports.org/builders here] if you prefer to install prebuilt binaries. It can take several weeks after a new macOS release before builders finish building ports. |
| | 8 | |
| | 9 | == Updating MacPorts Base == |
| | 10 | |
| | 11 | MacPorts must be [https://www.macports.org/install.php installed] in a version configured for macOS 27 Golden Gate. If you update from an older OS version, you need to run `port migrate` to reinstall MacPorts base and installed ports that are not OS-independent (see link above). |
| | 12 | |
| | 13 | Ensure you have Xcode 27.0 or greater installed and selected (e.g. `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`), and that you have the command line tools installed (`xcode-select --install`). (See below for a potential problem when upgrading from older CLT versions.) You also have to agree to the license by running `sudo xcodebuild -license`. |
| | 14 | |
| | 15 | There have been reports that the `-license` option might not be sufficient alone, and following command might be required to agree to the license: `sudo xcodebuild -runFirstLaunch` |
| | 16 | |
| | 17 | == Compiling C++ fails == |
| | 18 | |
| | 19 | The installer for the Command Line Tools for Xcode 16 and later may not delete a directory that was installed by some older versions of the CLTs, which unfortunately causes clang++ to look in the wrong place for C++ headers. The majority of ports that contain C++ code will fail to build as a result. |
| | 20 | |
| | 21 | The fix is to delete the stray directory if it exists: `sudo rm -rf /Library/Developer/CommandLineTools/usr/include/c++` |
| | 22 | |
| | 23 | Then clean the ports that failed to build, and try again. |
| | 24 | |
| | 25 | Ticket: #70750 |
| | 26 | |
| | 27 | == Trace mode not working == |
| | 28 | |
| | 29 | Building ports in trace mode (i.e. with the `-t` option) will fail on Apple Silicon systems running Golden Gate. This appears to be due to new security features in Ventura+. This issue is being followed in Ticket: #66358 |
| | 30 | |
| | 31 | == Rosetta 2 == |
| | 32 | |
| | 33 | 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. |
| | 34 | |
| | 35 | == Metal toolchain is no longer bundled in Xcode == |
| | 36 | Since Xcode 26 the Metal toolchain is a separate Xcode component and no longer automatically included out-of-the-box. |
| | 37 | 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. |
| | 38 | |
| | 39 | Port maintainers that maintain ports that require the Metal toolchain to build are encouraged to adopt the new `metal` PortGroup for these ports. |
| | 40 | 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. |
| | 41 | |
| | 42 | 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: |
| | 43 | |
| | 44 | {{{ |
| | 45 | sudo port selfupdate |
| | 46 | xcodebuild -downloadComponent MetalToolchain |
| | 47 | }}} |
| | 48 | |
| | 49 | Then verify that the Metal toolchain component has status `installed`: |
| | 50 | |
| | 51 | {{{ |
| | 52 | ❯ xcodebuild -showComponent MetalToolchain |
| | 53 | (...) |
| | 54 | Status: installed |
| | 55 | (...) |
| | 56 | }}} |
| | 57 | |
| | 58 | Also verify that the MacPorts user is able to execute it to report the Metal toolchain version: |
| | 59 | |
| | 60 | {{{ |
| | 61 | sudo --user=macports xcrun metal --version |
| | 62 | }}} |
| | 63 | |
| | 64 | If the command above returns an error, try killing the xcrun cache for the MacPorts user (it will be recreated), and test again: |
| | 65 | |
| | 66 | {{{ |
| | 67 | sudo --user=macports xcrun --kill-cache |
| | 68 | sudo --user=macports xcrun metal --version |
| | 69 | }}} |
| | 70 | |
| | 71 | Finally, it may be [ticket:73262 necessary] to reboot to really clear the {{{xcrun}}} cache. |
| | 72 | |
| | 73 | Shoutout to Mark Mentovai for all his detective work! See #73008 for more details. |
| | 74 | |
| | 75 | == Tickets for Broken Ports == |
| | 76 | |
| | 77 | [[TicketQuery(component=ports&status!=closed&keywords~=goldengate,or,component=ports&status!=closed&keywords~=27.0)]] |
| | 78 | [[TicketQuery(component=ports&status!=closed&keywords!~= goldengate,and,keywords!~=27.0&summary~=Golden%20Gate,or,summary=~[^0-9]27\.0[^0-9])]] |