Skip to content

zig build fails with a dyld error on x86_64 macOS Tahoe #25521

@kfinn

Description

@kfinn

Zig Version

0.15.1

Steps to Reproduce and Observed Behavior

On an x86_64 machine running macOS Tahoe, create a new zig project and attempt to run zig build. Observed behavior is a dyld error: segment '__CONST_ZIG' vm address out of order in [...]/build.

Terminal output:

$ mkdir zig-build-macos-tahoe-bug
$ cd zig-build-macos-tahoe-bug
$ zig init
info: created build.zig
info: created build.zig.zon
info: created src/main.zig
info: created src/root.zig
info: see `zig build --help` for a menu of options
$ zig build
dyld[96605]: segment '__CONST_ZIG' vm address out of order in /Users/kevin/kfinn/zig-build-macos-tahoe-bug/.zig-cache/o/94ec34d9839cb5dcc5cc3580eeb9cac2/build
dyld[96605]: segment '__CONST_ZIG' vm address out of order
error: the following build command crashed:
.zig-cache/o/94ec34d9839cb5dcc5cc3580eeb9cac2/build /Users/kevin/zig-x86_64-macos-0.15.1/zig /Users/kevin/zig-x86_64-macos-0.15.1/lib /Users/kevin/kfinn/zig-build-macos-tahoe-bug .zig-cache /Users/kevin/.cache/zig --seed 0xbb126b3c -Z35b9e37fdc90c16c

Expected Behavior

zig build successfully builds the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-x86_6464-bit x86bugObserved behavior contradicts documented or intended behaviorlinkingos-macos

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions