Xcode Cloud 26b7 Metal Compilation Failure

I've been getting intermittent failures on Xcode code compiling my app on multiple platforms because it fails to compile a metal shader.

The Metal Toolchain was not installed and could not compile the Metal source files. Download the Metal Toolchain from Xcode > Settings > Components and try again.

Sometimes if I re-run it, it works fine. Then I'll run it again, and it will fail.

If you tell me to file a feedback, please tell me what information would be useful and actionable, because this is all I have.

Sometimes it says this:

lstat(
/Volumes/workspace/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/<TARGETNAME>/IntermediateBuildFilesPath/<TARGETNAME>.build/Release-iphoneos/<APPNAME>.build/Metal/PageCurl.dat
): No such file or directory (2)

Oh here's a ticket for this problem that I closed earlier in the beta cycle cause it was fixed once. Feel free to reopen it if you can.

FB18269317

@J0hn Thank you for filling the Feedback report.

Having the exact same problem here, but it never works for me. Tried re-running, changing Xcode versions, etc. Even tried to install Metal using a pre_build script. It stopped working this week.

This is still failing on the RC builds on Xcode Cloud. (both Tahoe and Xcode)

This is still broken in Xcode 26 Stable builds

It keep failing, nobody from Apple investigating this?

I have found that adding this to ci_pre_xcodebuild.sh solves my problem when using 26.0.1:

# Get Xcode major version
# `xcodebuild -version` returns something like:
# Xcode 26.0.1
# Build version 17A400
XCODE_VERSION=$(xcodebuild -version | head -n 1 | awk '{print $2}' | cut -d. -f1)

if [ "$XCODE_VERSION" -ge 26 ]; then
    if xcodebuild -showComponent metalToolchain >/dev/null 2>&1; then
        echo "Metal toolchain is installed"
    else
        echo "Metal toolchain is not installed. Failing the build."
        exit 1
    fi
fi

I've found that adding the following to ci_pre_xcodebuild.sh fixes the issue for me:


# Get Xcode major version
# `xcodebuild -version` returns something like:
# Xcode 26.0.1
# Build version 17A400

XCODE_VERSION=$(xcodebuild -version | head -n 1 | awk '{print $2}' | cut -d. -f1)

if [ "$XCODE_VERSION" -ge 26 ]; then
    if xcodebuild -showComponent metalToolchain >/dev/null 2>&1; then
        echo "Metal toolchain is installed"
    else
        echo "Metal toolchain is not installed. Failing the build."
        exit 1
    fi
fi

This issue seemed to have been fixed in Xcode 26 (17A234), but it has re-appeared in Xcode 26.0.1 (17A400), which is the version currently marked as "Latest Release" in the Xcode Cloud environments setting.

Manually setting the version to Xcode 26 seems to be resolving the issue for now.

Anyone know if it's going to be this way going forward?

I get it that a lot of ppl don't need the tool chain, thus making it optional. But I feel like the runners in xcode cloud should have this installed by default

Each build adds 5+ minutes just to download&install it.

I'm actually considering having a prebuilt metallib in the repo if this will be the case going forward.

Xcode Cloud 26b7 Metal Compilation Failure
 
 
Q