GPTK Installation Error: No Such File or Directory

I am attempting to install Apple's Game Porting Toolkit. I have been following the 'read me' instructions that Apple provides when you install the Game Porting Toolkit package on Apple's developer website. I ran $ brew -v install apple/apple/game-porting-toolkit, which downloaded for around 20 minutes before it reached:

==> Pouring pkg-config--0.29.2_3.sonoma.bottle.tar.gz
ln -s ../Cellar/pkg-config/0.29.2_3/bin/pkg-config pkg-config
ln -s ../../Cellar/pkg-config/0.29.2_3/share/aclocal/pkg.m4 pkg.m4
ln -s ../../Cellar/pkg-config/0.29.2_3/share/doc/pkg-config pkg-config
ln -s ../../../Cellar/pkg-config/0.29.2_3/share/man/man1/pkg-config.1 pkg-config.1
Error: No such file or directory @ rb_sysopen - /Users/anna/Library/Caches/Homebrew/downloads/c5b6da58fb5d679eeb1765833596e7394625255fb46b165955fc4c4de746080e--pkg-config--0.29.2_3.sonoma.bottle.tar.gz

I am completely stumped as to what to do in this case. I've tried uninstalling and reinstalling homebrew, trying to install GPTK on a fresh user on my mac, and running brew cleanup and trying to GPTK install again. I would really appreciate any help or suggestions for me to fix this!

This is the output of brew doctor:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libtlImageIO.dylib
  /usr/local/lib/libtliadjust50.dylib
  /usr/local/lib/libtliclean30.dylib
  /usr/local/lib/libtlidejpeg40.dylib
  /usr/local/lib/libtlieffecta11.dylib
  /usr/local/lib/libtlieffecta12.dylib
  /usr/local/lib/libtliinfocus10.dylib
  /usr/local/lib/libtlistar10.dylib

And this is the output of brew config

HOMEBREW_VERSION: 4.1.20
ORIGIN: https://github.com/Homebrew/brew
HEAD: d3d51d3448966b5250b5c60110c945040054803d
Last commit: 8 days ago
Core tap JSON: 19 Nov 22:15 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.6zCg6FefHr/org.macosforge.xquartz:0
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.1.1-x86_64
CLT: 15.1.0.0.1.1699597245
Xcode: 15.1 => /Applications/Xcode-beta.app/Contents/Developer
Rosetta 2: true

Replies

There appears to be multiple things going on in your error messages.

The "No such file or directory" error appears to suggest that brew attempted to, but failed to download the gameportingtoolkit bottle. You can open the specified folder ("Users/anna/Library/Caches/Homebrew/downloads") and see if the file is there or not. I'm going to guess that brew is correct and the file failed to download for some reason.

However, more concerning are your errors from the "brew doctor" command which states that there are unexpected files in your homebrew installation (ie. files in /usr/local that homebew didn't install. I'm guessing you already had an Apple Silicon installation of Homebrew and then switched to X06_64 architecture (in following the instructions) and attempted to install X86_64 GamePortingToolkit into the preexisting Apple Silicon installation of HomeBrew.

At this point it's possible that you may have damaged your previous HomeBrew installation. I believe you need to create a new X86_64 HomeBrew installation in a location other than /usr/local and reattempt to install CamePortingToolkit into that new installation of HomeBrew. Afterward, if you need your original Apple Silicon installation of HomeBrew in /usr/local you may need to fix or reinstall that installation.