capy-ui / capy

💻Build one codebase and get native UI on Windows, Linux and Web
https://capy-ui.org
Mozilla Public License 2.0
1.6k stars 60 forks source link

MacOs arm64 `zig build` - failed #85

Open ego opened 2 months ago

ego commented 2 months ago

❯ uname -a
Darwin MacBook-Pro-2 23.5.0 Darwin Kernel Version 23.5.0 RELEASE_ARM64_T6031 arm64

❯ zig version
0.13.0

capy on  master via  ↯ v0.13.0
❯ zig build
/.cache/zig/p/1220bc2612b57b0cfaaecbcac38e3144e5a9362ff668d71eb8334e895047bdbb7148/build.zig:9:33: error: no field named 'path' in union 'Build.LazyPath'
        .root_source_file = .{ .path = "stub.c" },
                                ^~~~
/opt/homebrew/Cellar/zig/0.13.0/lib/zig/std/Build.zig:2171:22: note: union declared here
pub const LazyPath = union(enum) {
                     ^~~~~
referenced by:
    runBuild__anon_15902: /opt/homebrew/Cellar/zig/0.13.0/lib/zig/std/Build.zig:2116:27
    dependencyInner__anon_14558: /opt/homebrew/Cellar/zig/0.13.0/lib/zig/std/Build.zig:2097:29
    remaining reference traces hidden; use '-freference-trace' to see all reference traces
/.cache/zig/p/1220c94dbcdf5a799ce2b1571978ff3c97bab1341fe329084fcc3c06e5d6375469b9/build.zig:7:56: error: no field named 'path' in union 'Build.LazyPath'
    _ = b.addModule("objc", .{ .root_source_file = .{ .path = "src/main.zig" } });
                                                       ^~~~
/opt/homebrew/Cellar/zig/0.13.0/lib/zig/std/Build.zig:2171:22: note: union declared here
pub const LazyPath = union(enum) {
                     ^~~~~
Gogopex commented 2 months ago

that's from the zig-objc bindings and zig-build-macos-sdk being outdated

you can edit the cache files directly (obviously somewhat silly) or clone the dependencies and include them locally to fix this

I'll check if the build.zig.zon can be bumped, and/or if the deps themselves need to be updated

ego commented 1 month ago

that's from the zig-objc bindings and zig-build-macos-sdk being outdated

you can edit the cache files directly (obviously somewhat silly) or clone the dependencies and include them locally to fix this

I'll check if the build.zig.zon can be bumped, and/or if the deps themselves need to be updated

Sorry for bothering, any updates? I can't get how it's happens. Package manager with pinned version and it is didn't works properly.

Gogopex commented 1 month ago

@ego I gave it a try, but even fixing these issues led me to seeing that the MacOS implementation is still very much in progress. I started working on it, but the breadth somewhat pushed me off.

Unless the capy contributors correct me, I believe MacOS support is simply not present ATM but should be coming!