nillerusr / source-engine

Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
Other
1.13k stars 174 forks source link

[macOS] Build fails on Apple Silicon; waf configure thinks target CPU is x86_64 #359

Open timmead opened 3 weeks ago

timmead commented 3 weeks ago

I'm trying to build on Sonoma 14.5 on an M1 Pro, but waf configure fails every time:

[master][~/Developer/source-engine]$ python3 waf configure -T release --prefix='' --build-games=cstrike
Setting top to                                          : /Users/timmead/Developer/source-engine 
Setting out to                                          : /Users/timmead/Developer/source-engine/build 
Build type                                              : release 
LTO build                                               : no 
PolyOpt build                                           : no 
Checking for 'clang' (C compiler)                       : /usr/bin/clang 
Target OS                                               : darwin 
Target CPU                                              : x86_64 
Target binfmt                                           : mac-o 
Checking for 'clang++' (C++ compiler)                   : /usr/bin/clang++ 
Target OS                                               : darwin 
Target CPU                                              : x86_64 
Target binfmt                                           : mac-o 
Checking for c flags '-MMD'                             : yes 
Checking for cxx flags '-MMD'                           : yes 
Checking for program 'git'                              : /usr/bin/git 
Checking git hash                                       : 29985681 
Checking for program 'strip'                            : /usr/bin/strip 
Testing 32bit support                                   : no 
Testing 64bit support                                   : yes 
Checking for required C flags                           : yes 
Checking for required C++ flags                         : yes 

and

[master][~/Developer/source-engine]$ clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

[master][~/Developer/source-engine]$ which brew
/opt/homebrew/bin/brew

Is there a way to force build config/architecture?