Hi, I upgraded Zig to 0.14.0 using homeBrew and now i get this error when running any Zig command. MacOS is Ventura 13.7.4.
Zig is in.
/usr/local/bin/zig
Mac Version
ProductName: macOS
ProductVersion: 13.7.4
BuildVersion: 22H420
Error:
error: Zig was built/linked incorrectly: LLVM and Clang have separate copies of libc++
If you are dynamically linking LLVM, make sure you dynamically link libc++ too
It means Hombrew has improperly packaged Zig and you should not use it.
Tracking issue:
opened 04:04PM - 10 Mar 25 UTC
bug
os-macos
linking
Hello there 👋
As reported in https://github.com/Homebrew/homebrew-core/issues/21… 0073 and https://github.com/ziglang/zig/issues/23127, Zig is built/linked incorrectly when you try to install it via Homebrew. This is because it is not possible to dynamically link system libc++ when using a package manager (e.g. Homebrew) for macOS.
For further context:
https://github.com/Homebrew/homebrew-core/pull/210173/files/8c652a274e6fda98b4ff8efe82b125af8344433b
https://ziggit.dev/t/linking-stage3-zig-dynamically-with-system-libc/5726
3 Likes