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

Bundled macOS headers cannot be found using #include in assembly files #20361

Closed
alexrp opened this issue Jun 20, 2024 · 0 comments · Fixed by #20419
Closed

Bundled macOS headers cannot be found using #include in assembly files #20361

alexrp opened this issue Jun 20, 2024 · 0 comments · Fixed by #20419
Labels
bug Observed behavior contradicts documented or intended behavior
Milestone

Comments

@alexrp
Copy link
Member

alexrp commented Jun 20, 2024

Zig Version

0.13.0

Steps to Reproduce and Observed Behavior

cat test.c
#include <mach/machine/vm_param.h>
int main(){}cat test.S
#include <mach/machine/vm_param.h>zig build-exe test.c -target x86_64-macos-nonezig build-exe test.S -target x86_64-macos-none
error(compilation): clang failed with stderr: test.S:1:10: fatal error: 'mach/machine/vm_param.h' file not found
    1 | #include <mach/machine/vm_param.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

test.S:1:1: error: clang exited with code 1

Ran into this while trying to cross-compile libffi from Linux to Apple platforms with a build.zig script.

Expected Behavior

No error.

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
2 participants