79826082

Date: 2025-11-21 02:30:55
Score: 3.5
Natty:
Report link

I'm trying to update PyTorch for MacPorts and am unable to access metalToolchain across different accounts :

sudo -u macports bash -c 'cd /opt/local/var/macports/build/_opt_local_ports_python_py-pytorch/py313-pytorch/work/pytorch-v2.9.1/build/caffe2/aten/src/ATen/ ; xcrun metal -std=metal3.1 bfloat_inc.metal'
error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain

This obviously breaks package manager builds like MacPorts.

There's some permissions issue for accounts different than the one that installed metalToolchain.

Here's what xcodebuild shows run as the user account versus the macports account:

$ xcodebuild -showComponent metalToolchain
Asset Path: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/68d8db6212b48d387d071ff7b905df796658e713.asset/AssetData
Build Version: 17B54
Status: installed
Toolchain Identifier: com.apple.dt.toolchain.Metal.32023
Toolchain Search Path: /Users/username/Library/Developer/DVTDownloads/MetalToolchain/mounts/68d8db6212b48d387d071ff7b905df796658e713
$ sudo -u macports xcodebuild -showComponent metalToolchain
2025-11-20 16:28:33.645 xcodebuild[72040:426969]  IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “68d8db6212b48d387d071ff7b905df796658e713” couldn’t be opened because you don’t have permission to view it.
2025-11-20 16:28:33.795 xcodebuild[72040:427010]  IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “68d8db6212b48d387d071ff7b905df796658e713” couldn’t be opened because you don’t have permission to view it.
2025-11-20 16:28:33.796 xcodebuild[72040:426967]  IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “68d8db6212b48d387d071ff7b905df796658e713” couldn’t be opened because you don’t have permission to view it.
Asset Path: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/68d8db6212b48d387d071ff7b905df796658e713.asset/AssetData
Build Version: 17B54
Status: installed
Toolchain Search Path: /Users/username/Library/Developer/DVTDownloads/MetalToolchain/mounts/68d8db6212b48d387d071ff7b905df796658e713

I've tried fixing permissions, to no avail, and ls -ld@ doesn't show any obvious permissions issues.

Does anyone know how to make metalToolchain accessible to multiple users? Or simply the macports user?

Reasons:
  • RegEx Blacklisted phrase (2): Does anyone know
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: essandess