Xcode_26 not compiling Metal project

Hello


Xcode 26.0.1 (17A400) Missing some Metal components


When building a program using Metal, it induces an unexpected error :


“error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain

Command CompileMetalFile failed with a nonzero exit code”


Which terminates the build


The fix given “xcodebuild -downloadComponent MetalToolchain” using sudo does not work


Did someone find a work around or could resolve the issue?


Many thanks



Jean

MacBook Air 15″, macOS 26.0

Posted on Oct 2, 2025 3:02 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 14, 2025 9:02 AM

1) Triger this in terminal:

xcodebuild -downloadComponent MetalToolchain


2) Open downloaded asset, it should be located somewhere here


/System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/68d8db6212b48d387d071ff7b905df796658e713.asset/AssetData/Restore/022-20369-066.dmg


3) Manually move the Metal.xctoolchain to the xcode' toolchain folder


/Library/Developer/Toolchains/Metal.xctoolchain


4) Clean, Rebuild


9 replies
Question marked as Top-ranking reply

Nov 14, 2025 9:02 AM in response to jean-mariefromrixensart

1) Triger this in terminal:

xcodebuild -downloadComponent MetalToolchain


2) Open downloaded asset, it should be located somewhere here


/System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/68d8db6212b48d387d071ff7b905df796658e713.asset/AssetData/Restore/022-20369-066.dmg


3) Manually move the Metal.xctoolchain to the xcode' toolchain folder


/Library/Developer/Toolchains/Metal.xctoolchain


4) Clean, Rebuild


Xcode_26 not compiling Metal project

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.