Multiple error: undefined symbol after upgrade to Mac 26.4 #31756

Closed
opened 2026-04-04 10:05:32 +02:00 by KieranP · 7 comments

Zig Version

0.15.2

Steps to Reproduce and Observed Behavior

https://github.com/KieranP/Game-Of-Life-Implementations/tree/master/zig

~/Work/gol_implementations/zig
› zig build-exe play.zig
error: undefined symbol: __availability_version_check
    note: referenced by /Users/kieran/.cache/zig/o/08fa7ef7bd78fe0aef4f9abd35e71be2/libcompiler_rt.a(libcompiler_rt_zcu.o):___isPlatformVersionAtLeast
error: undefined symbol: _abort
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.abort
error: undefined symbol: _arc4random_buf
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_crypto.tlcsprng.tlsCsprngFill
error: undefined symbol: _bzero
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged(usize,*debug.SelfInfo.Module__struct_3892,hash_map.AutoContext(usize),80).initMetadatas
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged([]const u8,u64,hash_map.StringContext,80).initMetadatas
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged([]const u8,debug.SelfInfo.Module__struct_3892.OFileInfo,hash_map.StringContext,80).initMetadatas
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged([]const u8,*cell.Cell,hash_map.StringContext,80).initMetadatas
    note: referenced 1 more times
error: undefined symbol: _clock_gettime
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.clock_gettime
error: undefined symbol: _fcopyfile
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_fs.File.Writer.sendFile
error: undefined symbol: _getenv
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.getenvZ
error: undefined symbol: _isatty
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.isatty
error: undefined symbol: _sigaction
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.sigaction
error: undefined symbol: _sigemptyset
    note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.sigemptyset

Started after updating to Mac OS 26.4

Expected Behavior

Should compile without issue

### Zig Version 0.15.2 ### Steps to Reproduce and Observed Behavior https://github.com/KieranP/Game-Of-Life-Implementations/tree/master/zig ``` ~/Work/gol_implementations/zig › zig build-exe play.zig error: undefined symbol: __availability_version_check note: referenced by /Users/kieran/.cache/zig/o/08fa7ef7bd78fe0aef4f9abd35e71be2/libcompiler_rt.a(libcompiler_rt_zcu.o):___isPlatformVersionAtLeast error: undefined symbol: _abort note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.abort error: undefined symbol: _arc4random_buf note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_crypto.tlcsprng.tlsCsprngFill error: undefined symbol: _bzero note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged(usize,*debug.SelfInfo.Module__struct_3892,hash_map.AutoContext(usize),80).initMetadatas note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged([]const u8,u64,hash_map.StringContext,80).initMetadatas note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged([]const u8,debug.SelfInfo.Module__struct_3892.OFileInfo,hash_map.StringContext,80).initMetadatas note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_hash_map.HashMapUnmanaged([]const u8,*cell.Cell,hash_map.StringContext,80).initMetadatas note: referenced 1 more times error: undefined symbol: _clock_gettime note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.clock_gettime error: undefined symbol: _fcopyfile note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_fs.File.Writer.sendFile error: undefined symbol: _getenv note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.getenvZ error: undefined symbol: _isatty note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.isatty error: undefined symbol: _sigaction note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.sigaction error: undefined symbol: _sigemptyset note: referenced by /Users/kieran/.cache/zig/tmp/6c3b8dd220d47e04/play_zcu.o:_posix.sigemptyset ``` Started after updating to Mac OS 26.4 ### Expected Behavior Should compile without issue
Contributor

#31658 should be fixed on master

https://codeberg.org/ziglang/zig/issues/31658 should be fixed on master

@fardragon Is there a plan to build a 0.15 with this patch as well?

For other people hitting this: the issue fardragon links ( #31658 ) has a remedy in it (rolling back xcode commandline tools).

@fardragon Is there a plan to build a 0.15 with this patch as well? For other people hitting this: the issue fardragon links ( #31658 ) has a remedy in it (rolling back xcode commandline tools).
Contributor

@stephan_gfx wrote in #31756 (comment):

@fardragon Is there a plan to build a 0.15 with this patch as well?

For other people hitting this: the issue fardragon links ( #31658 ) has a remedy in it (rolling back xcode commandline tools).

I wouldn't know, but I doubt it, since it seems we're fairly close to 0.16 release

@stephan_gfx wrote in https://codeberg.org/ziglang/zig/issues/31756#issuecomment-12918018: > @fardragon Is there a plan to build a 0.15 with this patch as well? > > For other people hitting this: the issue fardragon links ( #31658 ) has a remedy in it (rolling back xcode commandline tools). I wouldn't know, but I doubt it, since it seems we're fairly close to 0.16 release
Owner

Another workaround is to pass an explicit target, "cross compiling" for macos which will ignore your system files.

Another workaround is to pass an explicit target, "cross compiling" for macos which will ignore your system files.

Got it. Is it known if this is an issue for future xcode releases as well? Just wondering if it means that if for whatever reason someone wants to go back to the 0.15 compiler on mac in the future they'll need to employ one of these work arounds.

Thanks for the responses! I'll try the cross-compile trick, that works better for my use case.

Got it. Is it known if this is an issue for future xcode releases as well? Just wondering if it means that if for whatever reason someone wants to go back to the 0.15 compiler on mac in the future they'll need to employ one of these work arounds. Thanks for the responses! I'll try the cross-compile trick, that works better for my use case.
Owner

Closing as duplicate of #31658.

Closing as duplicate of https://codeberg.org/ziglang/zig/issues/31658.
Owner

@stephan_gfx wrote in #31756 (comment):

Got it. Is it known if this is an issue for future xcode releases as well? Just wondering if it means that if for whatever reason someone wants to go back to the 0.15 compiler on mac in the future they'll need to employ one of these work arounds.

Only Zig 0.16.0+ will have the fix. So if you use one of these newer Xcode versions with 0.15.2 or older, you will need to work around the issue.

@stephan_gfx wrote in https://codeberg.org/ziglang/zig/issues/31756#issuecomment-12921834: > Got it. Is it known if this is an issue for future xcode releases as well? Just wondering if it means that if for whatever reason someone wants to go back to the 0.15 compiler on mac in the future they'll need to employ one of these work arounds. Only Zig 0.16.0+ will have the fix. So if you use one of these newer Xcode versions with 0.15.2 or older, you will need to work around the issue.
Sign in to join this conversation.
No milestone
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ziglang/zig#31756
No description provided.