Skip to content
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

Add MacOS headers to get bdwgc to compile #18257

Open
plajjan opened this issue Dec 11, 2023 · 6 comments
Open

Add MacOS headers to get bdwgc to compile #18257

plajjan opened this issue Dec 11, 2023 · 6 comments
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@plajjan
Copy link

plajjan commented Dec 11, 2023

Zig Version

0.12.0-dev.1536+6b9f7e26c

Steps to Reproduce and Observed Behavior

The following header files are missing on Macos, which I need to compile bdwgc (https://github.com/actonlang/bdwgc/actions/runs/7168073811/job/19515450726):

  • mach-o/getsect.h
  • mach/exception.h
  • CoreFoundation/* (CoreFoundation/CoreFoundation includes all the other header files, so they come as one group)

Expected Behavior

I want it to compile please! :)

@plajjan plajjan added the bug Observed behavior contradicts documented or intended behavior label Dec 11, 2023
@nektro
Copy link
Contributor

nektro commented Dec 11, 2023

cc @kubkon

@kubkon
Copy link
Member

kubkon commented Dec 11, 2023

Mach headers - sure thing, we should upload them, framework headers are out of scope however. For frameworks, headers and dylib stubs, you will need to obtain on your own. An example of how this can be done in accordance with Apple eula is in https://github.com/hexops/xcode-frameworks

@plajjan
Copy link
Author

plajjan commented Dec 11, 2023

@kubkon thx! Are framework headers out of scope due to licensing or just a principal decision not to include those kinds of headers in zig?

@kubkon
Copy link
Member

kubkon commented Dec 12, 2023

@kubkon thx! Are framework headers out of scope due to licensing or just a principal decision not to include those kinds of headers in zig?

Licensing and the sheer size of the framework headers and stubs. Current plan is for a 3rd party to offer it as a Zig package.

@plajjan
Copy link
Author

plajjan commented Dec 14, 2023

@kubkon okok, makes sense. We managed to reduce the need for that CoreFoundation header (now only needed for IOS builds and I'm hopeful to remove that too), so the remaining mach / mach-o headers are the only remaining things missing! :)

@plajjan
Copy link
Author

plajjan commented Jan 8, 2024

FWIW, the Boehm-Demers-Weiser Garbage Collector, perhaps the most famous GC around, now has experimental support for using the zig build system, see ivmai/bdwgc@2666e3e (ping @andrewrk, maybe you're interested :)). Thanks a lot to @ivmai (the BDWGC maintainer) who helped make this happen, awesome work!

As we all know, zig is awesome at cross-compile and so it also unlocked cross-compilation testing (although not run-time testing) of the BDWGC for CI testing, https://github.com/ivmai/bdwgc/actions/runs/7377734816. Very cool! Fixing this PR would help enabling cross-compilation builds targeting macos there as well! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

3 participants