domschl / WinSteamOnMac

Run the Windows version of Steam on macOS Sonoma or Sequoia with Apple's Game Porting Toolkit
177 stars 6 forks source link

Installation fails on `Error: apple/apple/game-porting-toolkit 1.1 did not build` #9

Open marlonrichert opened 8 months ago

marlonrichert commented 8 months ago

I get the above error after running

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

The following part of the output appears to be where the problem occurs:

/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:629:11: error: unknown type name 'SecTrustSettingsDomain'
    const SecTrustSettingsDomain domains[] = {
          ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:630:9: error: use of undeclared identifier 'kSecTrustSettingsDomainSystem'
        kSecTrustSettingsDomainSystem,
        ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:631:9: error: use of undeclared identifier 'kSecTrustSettingsDomainAdmin'
        kSecTrustSettingsDomainAdmin,
        ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:632:9: error: use of undeclared identifier 'kSecTrustSettingsDomainUser'
        kSecTrustSettingsDomainUser
        ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/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-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:641:23: error: use of undeclared identifier 'noErr'
        if (status == noErr)
                      ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/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)
                              ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/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-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:647:95: error: use of undeclared identifier 'noErr'
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)

I'm running macOS Sonoma 14.3.1 (23D60) on an Apple M2 MacBook Pro.

domschl commented 8 months ago

Which Xcode (or Command Line utilities) are you using?

QCastle commented 8 months ago

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`

domschl commented 8 months ago

There seems to be many similar report (including probably by you) on Apple's developer forums: Apple bug report. Linked here in the unlikely event somebody at Apple actually answers.

I will try to reproduce this with an installation from scratch, the only suspicion I have so far is some silent version update of a dependency that breaks the build, update will follow.

domschl commented 8 months ago

Unfortunatelly, the build for Apple's game-porting-toolkit is currently internally broken when trying to build Wine's crypt32.dll. So far I couldn't find a workground or downgrade.

So for the time being this is broken. I will update the main page with a warning. Thank you for reporting. I'll update if anything changes.

domschl commented 8 months ago

A workaround is to use the Whisky-App which uses built-in toolkit versions from Jan-24:

https://github.com/Whisky-App/Whisky

QCastle commented 8 months ago

Thanks for your help @domschl 🤝

domschl commented 8 months ago

Ok, here's the solution:

Building of the game porting toolkit works only up to and including Command Line Tools 15.1. One can use xcode-select to switch to an older version. Get the toolkit here:

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

QCastle commented 8 months ago

Working solution has been posted on Apple Developer forum which is using Xcode 15.1 instead of the most recent Xcode 15.3.

lukas8219 commented 6 months ago

@QCastle Do you mean using the CLI Tools 15.1 OR the Xcode itself as 15.1? I am facing the same issue running CLI tools 15.1

==> Configuration
HOMEBREW_VERSION: 4.3.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: e0bc557e7b991cb23583679e1cf1c8a92b793aeb
Last commit: 7 days ago
Core tap JSON: 26 May 22:29 UTC
Core cask tap JSON: 26 May 22:29 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 3.3.1 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.1/bin/ruby
CPU: dodeca-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.3-x86_64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.4
Rosetta 2: true
domschl commented 6 months ago

You can use either Xcode 15.1 or command line tools (CLT) 15.1. The important part is: They (Xcode or CLT) must be selected. According to your output, Xcode is still selected for you and if that's not Version 15.1, it won't work.

Verify with:

xcode-select -p

You can switch to the Command line tools with (sudo maybe required):

xcode-select -s /Library/Developer/CommandLineTools

and go back to Xcode with:

xcode-select -s /Applications/Xcode.app/Contents/Developer
lukas8219 commented 6 months ago

Thank you @domschl

I am still seeing a error after switching to xcode-select -s /Library/Developer/CommandLineTools

/private/tmp/game-porting-toolkit-20240527-85124-lxys2a/wine/dlls/wow64cpu/cpu.c:356:18: error: assignment to 'DWORD64' {aka 'long long unsigned int'} from 'PVOID' {aka 'void *'} makes integer from pointer without a cast [-Wint-conversion]
  356 |     context->Rsp = NtCurrentTeb()->TlsSlots[2]; /* WOW64_TLS_WINEHYBRID_RESERVED_R14 */
      |                  ^
make: *** [dlls/wow64cpu/cpu.cross.o] Error 1
make: *** Waiting for unfinished jobs....

My configs now are

==> Formula
Tap: apple/apple
Path: /usr/local/Homebrew/Library/Taps/apple/homebrew-apple/Formula/game-porting-toolkit.rb
==> Configuration
HOMEBREW_VERSION: 4.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9fdb0d53990d3e62e25325a6f89dbb769e84a530
Last commit: 12 hours ago
Core tap JSON: 27 May 13:00 UTC
Core cask tap JSON: 27 May 13:00 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 3.3.1 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.1/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.3-x86_64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.1
Rosetta 2: true

Any ideas into why this would be happening? MacBook M3 Max Pro 36GB

domschl commented 6 months ago

Did you do a complete uninstall of that previous trial before starting with the 15.1 version? (See paragraph at the end of the Readme). This error could be caused by a mixture of different compilation versions.

cam-shaw commented 6 months ago

To add to the conversation in case anyone else comes across this thread.

I've tried with both CLI tools and Xcode at their latest versions (15.4 as of writing), I've also tried both at versions 15.1 and a reboot of the machine with a clean install of x86 Homebrew. No luck. Same error every time.

==> Formula
Tap: apple/apple
Path: /usr/local/Homebrew/Library/Taps/apple/homebrew-apple/Formula/game-porting-toolkit.rb
==> Configuration
HOMEBREW_VERSION: 4.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9fdb0d53990d3e62e25325a6f89dbb769e84a530
Last commit: 6 days ago
Core tap JSON: 01 Jun 18:45 UTC
Core cask tap JSON: 01 Jun 18:45 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 3.3.1 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.1/bin/ruby
CPU: dodeca-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-x86_64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.1
Rosetta 2: true

My last few lines in the log is

/private/tmp/game-porting-toolkit-20240601-58603-psg9yp/wine/dlls/msvcrt20/msvcrt20.c: In function 'MSVCRT20__getmainargs':
/private/tmp/game-porting-toolkit-20240601-58603-psg9yp/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-20240601-58603-psg9yp/wine/dlls/msvcrt20/msvcrt20.c: In function 'MSVCRT20__wgetmainargs':
/private/tmp/game-porting-toolkit-20240601-58603-psg9yp/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....

From what I've spent some time reading, people have mixed results with downgrading which makes me think something else is at play here.

ZhenHuangLab commented 6 months ago

I just found that gcenx/homebrew-apple works for me. (with CLT and Xcode 15.0 beta2)

brew tap gcenx/homebrew-apple
brew install gcenx/homebrew-apple/game-porting-toolkit

output:

brew tap gcenx/homebrew-apple
==> Tapping gcenx/apple
Cloning into '/usr/local/Homebrew/Library/Taps/gcenx/homebrew-apple'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 29 (delta 10), reused 8 (delta 8), pack-reused 13
Receiving objects: 100% (29/29), 508.87 KiB | 1.31 MiB/s, done.
Resolving deltas: 100% (10/10), done.
Tapped 2 formulae (15 files, 4.0MB).

brew install gcenx/wine/game-porting-toolkit
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Tapping gcenx/wine
Cloning into '/usr/local/Homebrew/Library/Taps/gcenx/homebrew-wine'...
remote: Enumerating objects: 1345, done.
remote: Counting objects: 100% (634/634), done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 1345 (delta 456), reused 457 (delta 364), pack-reused 711
Receiving objects: 100% (1345/1345), 231.23 KiB | 947.00 KiB/s, done.
Resolving deltas: 100% (857/857), done.
Tapped 4 casks and 3 formulae (26 files, 297.3KB).
Warning: Treating gcenx/wine/game-porting-toolkit as a formula. For the cask, use gcenx/wine/game-porting-toolkit or specify the `--cask` flag.
==> Fetching gcenx/wine/game-porting-toolkit
==> Downloading https://github.com/Gcenx/homebrew-wine/releases/download/game-po
==> Downloading from https://objects.githubusercontent.com/github-production-rel
######################################################################### 100.0%
==> Installing game-porting-toolkit from gcenx/wine
==> Pouring game-porting-toolkit-1.1.monterey.bottle.tar.gz
==> Downloading https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x
######################################################################### 100.0%
==> Downloading https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x
######################################################################### 100.0%
==> Caveats
Please follow the instructions in the Game Porting Toolkit README to complete installation.

game-porting-toolkit is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have game-porting-toolkit first in your PATH, run:
  echo 'export PATH="/usr/local/opt/game-porting-toolkit/bin:$PATH"' >> ~/.zshrc

For compilers to find game-porting-toolkit you may need to set:
  export LDFLAGS="-L/usr/local/opt/game-porting-toolkit/lib"
==> Summary
🍺  /usr/local/Cellar/game-porting-toolkit/1.1: 1,626 files, 1.3GB
==> Running `brew cleanup game-porting-toolkit`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Then GPTK was successfully installed:

brew -v install apple/apple/game-porting-toolkit
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Warning: apple/apple/game-porting-toolkit 1.1 is already installed, it's just not linked.
To link this version, run:
  brew link game-porting-toolkit

15.0 beta2 doesn't work. I've also tried 15.1 and 15.3 :(

/private/tmp/game-porting-toolkit-20240603-33064-aw1toj/wine/dlls/msvcrt20/msvcrt20.c: In function 'MSVCRT20__getmainargs':
/private/tmp/game-porting-toolkit-20240603-33064-aw1toj/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-33064-aw1toj/wine/dlls/msvcrt20/msvcrt20.c: In function 'MSVCRT20__wgetmainargs':
/private/tmp/game-porting-toolkit-20240603-33064-aw1toj/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....

==> Formula
Tap: apple/apple
Path: /usr/local/Homebrew/Library/Taps/apple/homebrew-apple/Formula/game-porting-toolkit.rb
==> Configuration
HOMEBREW_VERSION: 4.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9fdb0d53990d3e62e25325a6f89dbb769e84a530
Last commit: 7 days ago
Core tap JSON: 03 Jun 03:10 UTC
Core cask tap JSON: 03 Jun 03:10 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_BOTTLE_DOMAIN: https://mirrors.ustc.edu.cn/homebrew-bottles
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.3ZMtBBOhIM/org.xquartz:0
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.1 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.1/bin/ruby
CPU: octa-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.2 => /Applications/Xcode-beta.app/Contents/Developer/usr/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-x86_64
CLT: 15.0.0.0.1.1686949477
Xcode: 15.0 => /Applications/Xcode-beta.app/Contents/Developer
Rosetta 2: true
domschl commented 6 months ago

Thanks for confirming. I will retest...

domschl commented 6 months ago

Log of reproduction attempt on Mac mini M1:

HOMEBREW_VERSION: 4.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9fdb0d53990d3e62e25325a6f89dbb769e84a530
Last commit: 7 days ago
Core tap JSON: 03 Jun 05:48 UTC
Core cask tap JSON: 03 Jun 05:48 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: nvim
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.1 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.1/bin/ruby
CPU: octa-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-x86_64
CLT: 15.1.0.0.1.1700200546
Xcode: N/A
Rosetta 2: true

Error reproduced.

 -fno-builtin -Wformat -g -O2
/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....

So as of now, apple_gaming_toolkit installation is (again) broken. I've updated the corresponding Bug Report at Apple.

domschl commented 5 months ago

Apple has now released a new version 2.0 beta of the toolkit. While the build problems currently have not been fixed, the guide has now been updated to simply use a 3rd party pre-built binary of the toolkit that then gets updated to use the latest graphics drivers from the 2.0 beta.

Using the pre-built binary instructions, it's again possible to install steam using the new graphics drivers. See the main page for instructions.

Gcenx commented 5 months ago

The new breakages with game-porting-toolkit are due to some mingw-w64 formula upgrades.


As for the prebuilt package I provide it was upgraded and includes D3DMetal-2.0b1 along with newly built dylibs on the same date & include some additional enhancements., this wasn’t built against brew

You might not be aware but wine actually uses gnutls for secure connections with macOS native certs.

domschl commented 5 months ago

I've updated the instructions to rely on the packaged toolkit components provided by your project. Thank you for this work!

jhljx commented 5 months ago

-fno-builtin -Wformat -g -O2 /private/tmp/game-porting-toolkit-20240603-70423-h1cgr2/wine/dlls/msvcrt20/msvcrt20.c: In function 'MSVCRT20getmainargs': /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 'MSVCRT20wgetmainargs': /private/tmp/game-porting-toolkit-20240603-70423-h1cgr2/wine/dlls/msvcrt20/msvcrt20.c:46:5: error: implicit declaration of function 'wgetmainargs'; did you mean 'MSVCRT20wgetmainargs'? [-Wimplicit-function-declaration] 46 | wgetmainargs( argc, wargv, wenvp, expand_wildcards, &new_mode ); | ^~~~~~ | MSVCRT20wgetmainargs make: [dlls/msvcrt20/msvcrt20.cross.o] Error 1 make: Waiting for unfinished jobs....

@domschl I met the same problem, so how can I fix it and build the toolkit successfully?

domschl commented 5 months ago

As mentioned above and in the guide: Apple's game-porting-toolkit homebrew script currently is broken. It is not possible to build the toolkit yourself (dependencies have changed and Apple did not fix or update the script).

Please follow the README and use Gcenx's prebuilt wine kit that includes Apple's metal libraries and can be used just similar to Apple's old kit.

Promaethius commented 5 months ago

I ran into the above mentioned error when going to install the game porting toolkit 2.0 beta 1. In addition to downgrading Xcode cli to 15.1, I also downgraded the formula for wingw-w64 from 12.0.0 to 11.0.1 which seems to be at least compiling.

Follow the readme instructions as normal but right before the brew install apple/apple/*

brew tap homebrew/homebrew-core --force
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/m

replace the mingw-w64.rb formula with https://raw.githubusercontent.com/Homebrew/homebrew-core/a5ccb4dbaf57a94746103a3da173cb405a67660d/Formula/mingw-w64.rb

and then export HOMEBREW_NO_INSTALL_FROM_API=1 run the brew -v install apple/apple/game-porting-toolkit as normal

Gcenx commented 5 months ago

You could use my version of the formula that provides a prebuilt bottle.

brew install --formula gcenx/wine/game-porting-toolkit

Alternatively use the cask, that avoids needing an Intel brew install

brew install --cask gcenx/wine/game-porting-toolkit

The cask has a couple of additional fixes and already includes D3DMetal-2.0b1

marvinHC54654g commented 4 months ago

Error: apple/apple/game-porting-toolkit 1.1 did not build,Please tell me.What should I do next?

Gcenx commented 4 months ago

Error: apple/apple/game-porting-toolkit 1.1 did not build,Please tell me.What should I do next?

https://github.com/domschl/WinSteamOnMac/issues/9#issuecomment-2211696245

marvinHC54654g commented 4 months ago

The new breakages with game-porting-toolkit are due to some mingw-w64 formula upgrades.

As for the prebuilt package I provide it was upgraded and includes D3DMetal-2.0b1 along with newly built dylibs on the same date & include some additional enhancements., this wasn’t built against brew

You might not be aware but wine actually uses gnutls for secure connections with macOS native certs.

Please send it to me. Thank you.

Gcenx commented 4 months ago

@marvinHC54654g again read https://github.com/domschl/WinSteamOnMac/issues/9#issuecomment-2211696245 this was right above your prior comment of build issues

marvinHC54654g commented 4 months ago

@marvinHC54654g again read #9 (comment) this was right above your prior comment of build issues Thank you so much. I'll download it first and have a try.