Skip to content

Build failures on 0.16.0-dev #9

@ringtailsoftware

Description

@ringtailsoftware

Using zig 0.16.0-dev on Mac aarch64 fails to build. From looking at TargetConditionals.h it seems like the C compiler doesn't have the #defines to know which platform it's targetting.

zig build
install
└─ install breakout
   └─ compile exe breakout Debug native 4 errors
main.zig:6:11: error: C import failed
const c = @cImport({
          ^~~~~~~~
referenced by:
    main.ErrorStore: main.zig:985:13
    ErrorStore: main.zig:980:20
    6 reference(s) hidden; use '-freference-trace=8' to see all references
error: translation failure
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include/TargetConditionals.h:407:10: error: TargetConditionals.h: unknown compiler (see comment above)
        #error TargetConditionals.h: unknown compiler (see comment above)
         ^
.zig-cache/o/3ca1054854f6a0160a5ef8f5e1c638c9/SDL3/SDL_platform_defines.h:225:6: error: SDL for macOS only supports deploying on 10.7 and above.
    #error SDL for macOS only supports deploying on 10.7 and above.
     ^
error: the following command failed with 4 compilation errors:
/Users/trj/Desktop/org/zig/bin/zig-aarch64-macos-0.16.0-dev.747+493ad58ff/zig build-exe .zig-cache/o/432fa0d780ee105ec5a60699dd1adc98/libSDL3.a -ODebug -I .zig-cache/o/3ca1054854f6a0160a5ef8f5e1c638c9 -Mroot=/Users/trj/Desktop/org/zig/git/zig-examples/breakout/main.zig -framework CoreMedia -framework CoreVideo -framework Cocoa -weak_framework UniformTypeIdentifiers -framework IOKit -framework ForceFeedback -framework Carbon -framework CoreAudio -framework AudioToolbox -framework AVFoundation -framework Foundation -framework GameController -framework Metal -framework QuartzCore -weak_framework CoreHaptics -lc --cache-dir .zig-cache --global-cache-dir /Users/trj/.cache/zig --name breakout --zig-lib-dir /Users/trj/Desktop/org/zig/bin/zig-aarch64-macos-0.16.0-dev.747+493ad58ff/lib/ --listen=-

Build Summary: 4/7 steps succeeded; 1 failed
install transitive failure
└─ install breakout transitive failure
   └─ compile exe breakout Debug native 4 errors

error: the following build command failed with exit code 1:
.zig-cache/o/d3815e86b2bd2a854c30d3580cb0549c/build /Users/trj/Desktop/org/zig/bin/zig-aarch64-macos-0.16.0-dev.747+493ad58ff/zig /Users/trj/Desktop/org/zig/bin/zig-aarch64-macos-0.16.0-dev.747+493ad58ff/lib /Users/trj/Desktop/org/zig/git/zig-examples/breakout .zig-cache /Users/trj/.cache/zig --seed 0xa81f087e -Z1b6d3986be587231

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions