4 ms·
Does anyone know why Zig isn't up to date on homebrew (v10.1, while v11 is latest)? I tried pulling a very simple SDL2 project off github and building it on my
by BaculumMeumEst 3y ago
Does anyone know why Zig isn't up to date on homebrew (v10.1, while v11 is latest)? I tried pulling a very simple SDL2 project off github and building it on my macbook M1 and hit https://github.com/ziglang/zig/issues/12069 https://github.com/ziglang/zig/issues/12069.
Homebrew also has no option for --HEAD, so I don't know if I'm running into a fixed issue or what. If anyone has recommendations or an example scaffold that shows how I can build a SDL2 zig project on a M1 with SDL2 installed via homebrew that would be helpful.
I can't get Rust-SDL2 to work on my system either, so maybe I'm just forever cursed to use C++. At least I understand how to interface with system libraries without playing build system Jenga I guess.
Edit: I manually installed a later version. I tried a few small SDL2 projects, but trying to run them all gave me:
```error: no field or member function named 'standardReleaseOptions' in 'Build'
const mode = b.standardReleaseOptions();```
Perhaps the build system had some breaking changes at some point. I would need to figure out how the old build system worked, as well as what changed, in order get past it.
OTOH ChatGPT was able to get me past my Rust issue (I gave it the output of sdl2_config and it spat out some environment variables to add to my ~/.profile which fixed my issue), so I will come back to Zig when it's a little more stable
- kristoff_it 3y agoJust download Zig from https://ziglang.org/download/ https://ziglang.org/download/. Manually editing your path seems a better alternative than being cursed to forever use C++.
- flohofwoe 3y agoBtw, an official 'zigup' tool which can install multiple Zig version side by side and switch between them would be a real life saver, especially for switching between nightly and stable. Having to find the right download link, unpacking and setting up paths is a bit too 90's ;) (especially when trying to keep up with nightlies). This would also a great tool for easily setting up a Zig toolchain on CI servers.
- michaelsbradley 3y agoI tried out zvm (Zig Version Manger) on my Mac laptop earlier today, seems to work even if it’s not super polished: https://github.com/tristanisham/zvm https://github.com/tristanisham/zvm
- throwawaymaths 3y agoSince zig has clean projects, asdf isn't half bad with zig (no idea if it does master)
- wredue 3y agoI’d probably not use homebrew or macports for zig anyway, because lots of projects track master (it’s annoying when you just want to write code. Good for people testing language features in the real world usage and shutting them down if they don’t work out). Anyway, I can’t remember for the life of me if I added it, or if it was there by default, but isn’t ~/.local/bin in the path by default on Mac? Download and drop the binary there.
- BaculumMeumEst 3y agoI ended up doing a GitHub search on "SDL", with language specified as "Zig", and sorted in reverse chronological order and found https://github.com/Liam-Malone/ZigPong https://github.com/Liam-Malone/ZigPong, which ran without issues by running "zig build run" in the repository directory.