On Nov 20, 2025, at 20:32, Steven Smith wrote: > > > I'm trying to update PyTorch for MacPorts and am unable to access > metalToolchain across different accounts : > > xcrun metal works for my user account. > > sudo -u macports xcrun metal does not work for account macports: > > 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? >
I thought this issue had been settled with the release of MacPorts 2.11.6.
