Error: apple/apple/game-porting-toolkit 1.1 did not build

My MacBook Air M1 has installed Mac OS Sonoma 14.3.1, and I tried to install game-poring-toolkit tonight. After the step which it requires me to input the command "brew -v install apple/apple/game-porting-toolkit", Terminal ran for minutes. But at the end this error appeared: Error: apple/apple/game-porting-toolkit 1.1 did not build. I don't know anything about coding and software. Could someone please tell me what cause this error and how to fix it after you read my post? I will appreciate your help!

I've seen the same issue. There are build errors.

x86_64-w64-mingw32-gcc -c -o dlls/ctl3d32/ctl3d32.cross.o /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/ctl3d32/ctl3d32.c \
  -I dlls/ctl3d32 -I /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/ctl3d32 -I \
  include -I /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/include -I \
  /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/include/msvcrt -D__WINESRC__ -D_UCRT \
  -D__WINE_PE_BUILD -Wall -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body \
  -Wignored-qualifiers -Winit-self -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes \
  -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op \
  -Wabsolute-value -Wno-format -Wformat-overflow -Wnonnull -mcx16 -gdwarf-4 -Wformat -g -O2
bison -o dlls/d3dcompiler_33/asmshader.tab.c -d /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/d3dcompiler_43/asmshader.y
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:629:11: error: unknown type name 'SecTrustSettingsDomain'
    const SecTrustSettingsDomain domains[] = {
          ^
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:630:9: error: use of undeclared identifier 'kSecTrustSettingsDomainSystem'
        kSecTrustSettingsDomainSystem,
        ^
flex -odlls/d3dcompiler_33/asmshader.yy.c /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/d3dcompiler_43/asmshader.l
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:631:9: error: use of undeclared identifier 'kSecTrustSettingsDomainAdmin'
        kSecTrustSettingsDomainAdmin,
        ^
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:632:9: error: use of undeclared identifier 'kSecTrustSettingsDomainUser'
        kSecTrustSettingsDomainUser
        ^
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:640:18: warning: this function declaration is not a prototype [-Wstrict-prototypes]
        status = SecTrustSettingsCopyCertificates(domains[domain], &certs);
                 ^
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:641:23: error: use of undeclared identifier 'noErr'
        if (status == noErr)
                      ^
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:647:31: warning: this function declaration is not a prototype [-Wstrict-prototypes]
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                              ^
bison -o dlls/d3dcompiler_34/asmshader.tab.c -d /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/d3dcompiler_43/asmshader.y
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:647:51: error: use of undeclared identifier 'kSecFormatX509Cert'
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                                                  ^
/private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/crypt32/unixlib.c:647:95: error: use of undeclared identifier 'noErr'
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                                                                                              ^
flex -odlls/d3dcompiler_34/asmshader.yy.c /private/tmp/game-porting-toolkit-20240311-57245-rrkdfh/wine/dlls/d3dcompiler_43/asmshader.l
2 warnings and 7 errors generated.
make: *** [dlls/crypt32/unixlib.o] Error 1
make: *** Waiting for unfinished jobs....

Getting exactly the same issue

Me too on macOS Sonoma 14.4 (23E214) M2. What's the way out?

brew -v install apple/apple/game-porting-toolkit

bison -o dlls/d3dcompiler_33/asmshader.tab.c -d /private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/d3dcompiler_43/asmshader.y
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:629:11: error: unknown type name 'SecTrustSettingsDomain'
    const SecTrustSettingsDomain domains[] = {
          ^
flex -odlls/d3dcompiler_33/asmshader.yy.c /private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/d3dcompiler_43/asmshader.l
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:630:9: error: use of undeclared identifier 'kSecTrustSettingsDomainSystem'
        kSecTrustSettingsDomainSystem,
        ^
bison -o dlls/d3dcompiler_34/asmshader.tab.c -d /private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/d3dcompiler_43/asmshader.y
flex -odlls/d3dcompiler_34/asmshader.yy.c /private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/d3dcompiler_43/asmshader.l
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:631:9: error: use of undeclared identifier 'kSecTrustSettingsDomainAdmin'
        kSecTrustSettingsDomainAdmin,
        ^
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:632:9: error: use of undeclared identifier 'kSecTrustSettingsDomainUser'
        kSecTrustSettingsDomainUser
        ^
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:640:18: warning: this function declaration is not a prototype [-Wstrict-prototypes]
        status = SecTrustSettingsCopyCertificates(domains[domain], &certs);
                 ^
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:641:23: error: use of undeclared identifier 'noErr'
        if (status == noErr)
                      ^
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:647:31: warning: this function declaration is not a prototype [-Wstrict-prototypes]
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                              ^
bison -o dlls/d3dcompiler_35/asmshader.tab.c -d /private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/d3dcompiler_43/asmshader.y
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:647:51: error: use of undeclared identifier 'kSecFormatX509Cert'
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                                                  ^
/private/tmp/game-porting-toolkit-20240324-68513-1jm8mg/wine/dlls/crypt32/unixlib.c:647:95: error: use of undeclared identifier 'noErr'
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                                                                                              ^
2 warnings and 7 errors generated.
make: *** [dlls/crypt32/unixlib.o] Error 1
make: *** Waiting for unfinished jobs....

==> Formula
Tap: apple/apple
Path: /usr/local/Homebrew/Library/Taps/apple/homebrew-apple/Formula/game-porting-toolkit.rb
==> Configuration
HOMEBREW_VERSION: 4.2.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: f6a4f42cc346694fac94fa1643bc2809d383b6f1
Last commit: 4 days ago
Core tap JSON: 23 Mar 19:26 UTC
Core cask tap JSON: 23 Mar 19:26 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.RPKzMABY5N/org.xquartz:0
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_ANALYTICS: set
Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: dodeca-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.4-x86_64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.3
Rosetta 2: true

Is this where we non-coders come to confess our sins? I too have the above mentioned errors. Forgive me.

I had the same issue. To fix I had to download and change Xcode to 15.0 beta 2 and command line tools to 15.0 beta 2. You can actually just download Xcode without deleting a newer one, just make sure you go to Xcode -> Settings -> Locations -> Command Line Tools and set it to "Xcode-beta 15.0". Then reload the Terminal and make sure you have the command line tools version 15.0 running pkgutil --pkg-info=com.apple.pkg.CLTools_Executables

Command Line Tools 15.1 also works fine, no need to downgrade to beta. Thanks Glazomer for figuring this out!

https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_15.1/Command_Line_Tools_for_Xcode_15.1.dmg

Is the latest version that works with building the game-porting-toolkit.

Maybe Apple should consider CI. :-)

Working for me too with Xcode 15.1. Thank you all!

Working for CLT 15.1

It's been confirmed by a couple other people, but installing the Command Line Tools 15.1 worked for me too.

try common line tool for Xcode 15.0, it works on mine

try command line tool for Xcode 15.0 instaed of 15.3, it works on mine

Not for me. Tried 15.0, 15.1, and 15.3.

As of now, installation of Apple's game-porting-toolkit is again broken, regardless of CLT/Xcode versions used. The compilation fails with:

/private/tmp/game-porting-toolkit-20240603-70423-h1cgr2/wine/dlls/msvcrt20/msvcrt20.c: In function 'MSVCRT20__getmainargs':
/private/tmp/game-porting-toolkit-20240603-70423-h1cgr2/wine/dlls/msvcrt20/msvcrt20.c:35:5: error: implicit declaration of function '__getmainargs' [-Wimplicit-function-declaration]
   35 |     __getmainargs( argc, argv, envp, expand_wildcards, &new_mode );
      |     ^~~~~~~~~~~~~
/private/tmp/game-porting-toolkit-20240603-70423-h1cgr2/wine/dlls/msvcrt20/msvcrt20.c: In function 'MSVCRT20__wgetmainargs':
/private/tmp/game-porting-toolkit-20240603-70423-h1cgr2/wine/dlls/msvcrt20/msvcrt20.c:46:5: error: implicit declaration of function '__wgetmainargs'; did you mean 'MSVCRT20__wgetmainargs'? [-Wimplicit-function-declaration]
   46 |     __wgetmainargs( argc, wargv, wenvp, expand_wildcards, &new_mode );
      |     ^~~~~~~~~~~~~~
      |     MSVCRT20__wgetmainargs
make: *** [dlls/msvcrt20/msvcrt20.cross.o] Error 1
make: *** Waiting for unfinished jobs....

This requires fixing by Apple.

Installation of what is now called "Evaluation environment for Windows games 2.0 beta" (also included in Game Porting Toolkit 2 beta) is still broken, with exactly the same problems stated above.

Somehow not surprising, since the homebrew formula to build the toolkit has not been updated.

Workaround is to use pre-built binaries that have been built during the 'golden age', when the toolkit still did built:

I decided to give this another try after the WWDC announcement and it seems like the build still fails for me with the same error message presented above by Pergamon. I'm using Xcode CLT 15.1 and macOS 14.5.

Security @Apple, please flag the current Apple Homebrew formula used in the installation of the Game Porting Toolkit at <https://github.com/apple/homebrew-apple/blob/main/Formula/game-porting-toolkit.rb> as security risk, since it installs outdated network, encryption and security components on user's machines (e.g. openssl 1.1). It is obvious to even a cursory reviewer that this script is completely un-salvageable, and seems to be in that state for quite some time, probably for reasons beyond the scope of bug reports. However, now, This requires a complete rewrite with up-to-date dependencies and should not be part of a 2.0 release in it's current state, even at a beta stage.

same issue, and 15.1 is not working. now you will be prompted:

Error: Your Xcode (15.0) is outdated.
Please update to Xcode 15.4 (or delete it).
Xcode can be updated from the App Store.

but if you are using 15.4 still get the error message:

Error: apple/apple/game-porting-toolkit 1.1 did not build
Logs:
     /Users/AAAA/Library/Logs/Homebrew/game-porting-toolkit/00.options.out
     /Users/AAAA/Library/Logs/Homebrew/game-porting-toolkit/01.configure
     /Users/AAAA/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc
     /Users/AAAA/Library/Logs/Homebrew/game-porting-toolkit/02.make
     /Users/AAAA/Library/Logs/Homebrew/game-porting-toolkit/wine64-build
If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core):
  apple/apple
Error: apple/apple/game-porting-toolkit 1.1 did not build
 
 
Q