Linker trying to link Metal toolchain for every object file on Catalyst

When building our project for Mac Catalyst with Xcode 26.2, we get this warning almost a hundred times, once for every object file:

directory not found for option '-L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst'

Somehow, every Link <FileName>.o build step got the following parameter, regardless if the target contained Metal files or not:

-L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst

The toolchain is mounted at this point, but the directory usr/lib/swift/maccatalyst doesn't exist.

When building the project for iOS, the option doesn't exist and the warning is not shown.

We already check the build settings, but we couldn't find a reason why the linker is trying to link against the toolchain here.

Even for targets that do contain Metal files, we get the following linker warning:

search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst' not found

Is this a known issue? Is there a way to get rid of these warnings?

Answered by DTS Engineer in 879095022

Based on the above I tried reproducing this with a test project. And lo! it’s trivial to reproduce:

  1. I started with Xcode 26.3 without the Metal Toolchain 26.3 component installed.
  2. I created a new project from the iOS > App template.
  3. In the General tab of the target editor, I removed the Mac (Designed for iPad) destination.
  4. And added the Mac (Mac Catalyst) destination.
  5. I selected My Mac (Mac Catalyst) as the run destination.
  6. I chose Product > Build; the project built without any warning.
  7. In Xcode > Settings > Components, I installed the Metal Toolchain 26.3 component.
  8. I chose Product > Clean.
  9. And then Product > Build.

I now see a build warning:

ld: warning: search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.7003.10.hJke6J/Metal.xctoolchain/usr/lib/swift/maccatalyst' not found

Given the above, I can only conclude that this is a bug. I did some digging and was unable to find any more backstory (for example, I thought that someone might’ve filed this already, but AFAICT that’s not the case). My recommendation is that you file a bug about it.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm just joining in with a "me too". If you have the MetalToolchain installed (even if you're not using it) this warning seems to appear for every MacCatalyst build. I don't have a workaround, yet.

Very annoying.

Based on the above I tried reproducing this with a test project. And lo! it’s trivial to reproduce:

  1. I started with Xcode 26.3 without the Metal Toolchain 26.3 component installed.
  2. I created a new project from the iOS > App template.
  3. In the General tab of the target editor, I removed the Mac (Designed for iPad) destination.
  4. And added the Mac (Mac Catalyst) destination.
  5. I selected My Mac (Mac Catalyst) as the run destination.
  6. I chose Product > Build; the project built without any warning.
  7. In Xcode > Settings > Components, I installed the Metal Toolchain 26.3 component.
  8. I chose Product > Clean.
  9. And then Product > Build.

I now see a build warning:

ld: warning: search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.7003.10.hJke6J/Metal.xctoolchain/usr/lib/swift/maccatalyst' not found

Given the above, I can only conclude that this is a bug. I did some digging and was unable to find any more backstory (for example, I thought that someone might’ve filed this already, but AFAICT that’s not the case). My recommendation is that you file a bug about it.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Linker trying to link Metal toolchain for every object file on Catalyst
 
 
Q