fixup: Macos sysroot crosscompiling - #35
Conversation
Adds framework/include search paths from --sysroot; library path is left to Zig's own sysroot-relative lookup (usr/lib), since passing it explicitly caused Zig to double-join the sysroot path. Adds a Linux CI job that downloads the wio-macos-sdk and cross-builds demo/framebuffer/vulkan for aarch64-macos with --sysroot, to verify this on an actual non-macOS host.
…sysroot
Previously this surfaced as a confusing linker error ('unable to find
framework Cocoa. searched paths: none') with no pointer to the fix.
Add a CI step that verifies this error path on a real Linux runner.
examples/metal has its own build.zig with its own Objective-C source (metal.m), so the top-level build.zig fix didn't cover it. Cross-compiling it with --sysroot previously failed on missing Security/AppKit headers. Also build it in the Linux sysroot-cross-compile CI job.
ypsvlq
left a comment
There was a problem hiding this comment.
Looks good in general, thanks for the fix.
| uses: mlugg/setup-zig@v2 | ||
| - name: Download macOS SDK | ||
| run: | | ||
| curl -sL https://github.com/ypsvlq/wio-macos-sdk/archive/1014fff9b544bf80200a2a9a92af257451286913.tar.gz | tar xz |
There was a problem hiding this comment.
As you pointed out in #33, it's probably not acceptable to redistribute the SDK.
For now the patch is shown to work, so its okay to remove this and I'll add native sysroot testing in CI later.
There was a problem hiding this comment.
you are correct, the difference is this never hits User caches, only CI machines which I am way more comfortable with. but ultimately its your repo and so it's your call.
There was a problem hiding this comment.
Sure it's preferable to that but I think ideally there isn't any license violations in the repo.
|
please pull in the build.zig sysroot fixes to unblock cross compiling linux-to-mac. |
Please remove the legally problematic CI change as requested in the review.
I'm sorry, is there something I can do to be less frustrating? |
b9ed28b to
263760b
Compare
263760b to
962554b
Compare
can you check if this solves the issues with --sysroot?
regarding discussion in #33