Skip to content

Fix broken zig 0.14 build due to bad zsdl dependency #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2025

Conversation

mjakeman
Copy link
Contributor

Fixes an issue where zgui brings in a non-0.14 compatible version of zsdl, breaking the final build.

This only seems to happen if you use all of zgui + zsdl + zsdl-prebuilt*.

My understanding of the problem is:

  • zsdl was updated to support the new build.zig syntax in zig-gamedev/zsdl@b080476
  • However zgui has an optional dependency pointing to zig-gamedev/zsdl@cd29a0b which doesn't include these changes
  • Zig decides to pull in both versions of zsdl, therefore pulling in the old and new versions of the prebuilt libraries at the same time.
  • The old prebuilt libraries use .@"sdl2-prebuilt-macos" which isn't supported, but Zig appears to suggest the error is coming from the new library (or at least is confusingly worded)

Bumping the dependency fixes things for me

@hazeycode hazeycode merged commit c203293 into zig-gamedev:main Mar 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants