Skip to content

Upgrade Zig to new Mach nominated ver 0.14.0-dev.1911+3bf89f55c #718

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 37 commits into from
Nov 2, 2024

Conversation

hazeycode
Copy link
Member

No description provided.

@OndraVoves
Copy link
Contributor

btw, nominations are still in progress. There was a bug in ZIG, it has been fixed, but it will probably be a different version than 0.14.0-dev.1710+8ee52f99c.

@hazeycode hazeycode changed the title Upgrade Zig to new Mach nominated ver 0.14.0-dev.1710+8ee52f99c Upgrade Zig to new Mach nominated ver 0.14.0-dev.1911+3bf89f55c Oct 18, 2024
@OndraVoves
Copy link
Contributor

@hazeycode I try compile this branch on my Mac and its compile without any problem. In my project I use zglfw, zpool, zjobs, ztracy, zgui, zflecs and everything works fine with new nominated zig.

@hazeycode
Copy link
Member Author

I can confirm this branch is building locally for me on an Intel Mac running macOS 13.5 and on an Apple silicon Mac running macOS 14.5. I wonder what's different with the CI runner environment.

@hazeycode
Copy link
Member Author

Other than macOS... Linux is working for me locally. For windows, I have pushed some more fixes, but monolith and physics_test_wgpu produce linker errors; note these are the only two samples that use both Dawn (zgpu) and Jolt (zphysics) together.

@a-day-old-bagel
Copy link
Member

I notice that zgpu and zphysics seem to be the only two libraries that are building with the -std=c++17 argument. And the linker errors are complaining about duplicate definitions for std::__1::bad_function_call and stuff.

I wonder if those two facts are related.

@a-day-old-bagel
Copy link
Member

a-day-old-bagel commented Oct 26, 2024

I've been trying to fix this, but it's proving quite difficult.

I believe that the issue is that dawn.lib, which is the precompiled lib we are just pulling from github as described in build.zig.zon, is exporting a bunch of these C++ function definitions that are conflicting with the definitions given elsewhere. I've tried all sorts of things to try to get zig to treat those definitions as "weakly linked" so that other definitions can override them without producing an error. So far nothing has helped.

I don't know what changed in zig to produce this behavior, but could it also be that the dawn.lib that was compiled for Windows could be recompiled in a way that doesn't export some of those symbols?

It makes me want to revisit #463

@hazeycode hazeycode added the breaking Indicates an API breaking change label Nov 2, 2024
hazeycode and others added 6 commits November 2, 2024 15:58
…svc (#725)

zmesh: use the new @extern field, .is_dll_import, to link the memory allocation functions from a shared library with the -msvc ABI
zphysics: fix compilation errors on msvc
zphysics: fix the definition of JPC_CharacterBaseSettings to account for an MSVC padding quirk
ztracy: fix compilation under .msvc (define `fileno` -> `_fileno` and fixup export / import defines)
Revert this after #718 is merged into main
@hazeycode hazeycode merged commit 613d847 into main Nov 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Indicates an API breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants