Stream: bugs

Topic: macOS linking: -syslibroot and non-framework libraries


view this post on Zulip pixelsprout (Sep 23 2026 at 02:13):

I'm building a Roc platform (Odin host) on nightly-2026-09-12-220fd47, target arm64mac. The link command shows that Roc passes -syslibroot targets/macos-sysroot and one -framework flag for every framework in that directory. So I can't point the sysroot at the Xcode SDK. The link then fails on Intel-only and private frameworks such as QTKit and SwiftUICore. Instead, I copy the 16 frameworks the host needs from the SDK into the sysroot.

Is there a way, or a plan, for a platform header to name the frameworks it needs, so the sysroot can be the SDK itself? Or is a hand-picked sysroot the intended approach?

view this post on Zulip Luke Boswell (Sep 23 2026 at 02:29):

To support macOS you will need .tbd stubs

view this post on Zulip Luke Boswell (Sep 23 2026 at 02:31):

This is how roc-gui does it https://github.com/lukewilliamboswell/roc-gui/tree/main/dependencies/macos-interfaces

view this post on Zulip pixelsprout (Sep 23 2026 at 02:38):

Oh right so you deliver your own .tbd stubs. Cool I'll use your approach later down the line. For now it works to copy from the Xcode SDK while I develop.


Last updated: Sep 24 2026 at 15:59 UTC