Repository navigation
lean-deps: strip system_sdk, use explicit paths for system dependencies - #56
Closed
nat3Github wants to merge 6 commits into
Closed
nat3Github wants to merge 6 commits into
nat3Github wants to merge 6 commits into
Conversation
nat3Github
marked this pull request as draft
September 4, 2026 23:37
Zig strips the leading / off an absolute -L path when --sysroot is set and rejoins it onto the sysroot, so passing sysroot+"/usr/lib" caused a doubled path and 'unable to find dynamic system library objc'. Passing "/usr/lib" as-is lets Zig's own join land correctly. Also error out early with a clear message when cross-compiling to macOS without --sysroot, instead of failing deep in the linker. Verified with zig 0.14.0 and 0.16.0 for aarch64-macos, x86_64-macos, and native (no sysroot).
nat3Github
marked this pull request as ready for review
September 6, 2026 07:40
Member
|
Hi. I'd like to delete system_sdk repo entirely if possible. From what you've said, simple removing the dependency on it doesn't mean that we stop breaking the law, we'd have to delete the Apple stuff from that repo right? Also why have you deleted the CI script? |
Author
|
sorry about the ci script, not really sure why i deleted it, ill reset and push after testing that sysroot cross-compiling works again!
yes it would be good to consider that, since you are hosting it. |
Registers the cross-path options unconditionally in build(), adds -Dsystem_framework_path, and uses them on macOS instead of b.sysroot (dropping the cwd_relative "/usr/lib" workaround that only existed because --sysroot re-roots absolute -L paths). --sysroot is graph-wide: it also reaches native host-tool steps in the same build graph and re-roots every absolute -L onto itself. Plain build options let the paths go only to the cross compile/link step. Claude-Session: https://claude.ai/code/session_0172xcFVWUqrMeXfDPoyi3V2
nat3Github
marked this pull request as draft
September 10, 2026 13:38
…ath/-Dframework_path/-Dlibrary_path Drop the redundant 'system_' prefix from the include/framework flag names so all three cross-compile options are named consistently (library_path already had no prefix). Local identifiers keep the 'system_' prefix for legibility (e.g. const system_library_path = b.option(..., "library_path", ...)). Claude-Session: https://claude.ai/code/session_0172xcFVWUqrMeXfDPoyi3V2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bundling macos sdks is illegal and bad practice because it leads to duplication in bigger software projects.
see david-vanderson/dvui#975
this PR enables cross compiling via --sysroot approach (for linux, mac)