mach
mach copied to clipboard
build: warn if trying to build for an outdated macOS version
First of all, I really want this project to succeed because the 3D graphics programming story on MacOS sucks. I've been trying to engage with it in a sane way (ie as a Go programmer who likes nice things) for years, and it's just not working. I would be happy to put in some money on a monthly basis to support this effort, ~let me know how~ (the sponsor link from the website 404s).
Second, the example on the website doesn't work out of the box for the ancient MacOS version I'm on (10.15.5). Should I upgrade? Yes. Should zig build
check for this version? Maybe? Should this dependency be documented? Probably yes.
% zig build run-example
info: cloning required sdk..
git clone https://github.com/hexops/sdk-macos-11.3 '/Users/me/Library/Application Support/hexops/sdk-macos-11.3'..
This SDK is distributed under the terms of the Xcode and Apple SDKs agreement:
https://www.apple.com/legal/sla/docs/xcode.pdf
Do you agree to those terms? [Y/n]
Cloning into 'sdk-macos-11.3'...
remote: Enumerating objects: 15503, done.
remote: Counting objects: 100% (15503/15503), done.
remote: Compressing objects: 100% (10692/10692), done.
remote: Total 15503 (delta 2275), reused 15484 (delta 2256), pack-reused 0
Receiving objects: 100% (15503/15503), 23.08 MiB | 8.28 MiB/s, done.
Resolving deltas: 100% (2275/2275), done.
Updating files: 100% (12360/12360), done.
error: gpu-dawn binaries for x86_64-macos.10.15.5...10.15.5-gnu not available.
error: -> open an issue: https://github.com/hexops/mach/issues
error: -> build from source (takes 5-15 minutes):
error: use -Ddawn-from-source=true or set `Options.from_source = true`
error:
error: -> Did you mean to use -Dtarget=x86_64-macos.12 ?
error: the following build command failed with exit code 1:
/Users/me/Code/hexops/mach/gpu/zig-cache/o/444ac3bf6e6500d6c624c400d6366e0e/build /Users/me/.local/opt/zig/zig-0.10.0-dev.1689/zig /Users/me/Code/hexops/mach/gpu /Users/me/Code/hexops/mach/gpu/zig-cache /Users/me/.cache/zig run-example
I would be happy to put in some money on a monthly basis to support this effort, let me know how (the sponsor link from the website 404s).
Figured out the sponsorship button. Probably fix the website though.
the sponsor link from the website 404s
Thank you so much for mentioning that! I totally missed that. I'll fix soon.
Should zig build check for this version? Maybe?
I think you're right, this is the right solution. The real answer here is that macOS 10 is old, I don't have the bandwidth to support it, and it's version of Metal is also older and imposes some limitations you might not want. Upgrading the OS is the right choice, zig build
should tell you this.