On the macOS 11 Big Sur beta, changes to how dynamic linking works breaks how zig searches for libraries.
On release 0.6.0, after creating the zig0 executable it throws this error:
Unable to check cache: zig-cache/h: file not found
make[2]: *** [CMakeFiles/zig_build_libstage2] Error 1
make[1]: *** [CMakeFiles/zig_build_libstage2.dir/all] Error 2
make: *** [all] Error 2
Although master has a completely different error. Probably unrelated to the dylib change.
: CommandLine Error: Option 'mc-relax-all' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
make[2]: *** [CMakeFiles/zig_build_libstage2] Error 1
make[1]: *** [CMakeFiles/zig_build_libstage2.dir/all] Error 2
make: *** [all] Error 2
On 0.6.0, removing the caching of libraries found via _dyld_get_image_name() in Error get_compiler_id(Buf **result) (compiler.cpp) allows zig to compile successfully. This seems to be due to _dyld_get_image_name() returning paths to libraries that were removed from the filesystem in the macOS beta.
Even after compiling, running ./zig build will result in Build Dependencies...lld: error: Unable to find library for -lSystem
Obviously not a super high priority as macOS 11 won't be released for some months.
This is my first time posting an issue here, so please let me know if I have failed to disclose any helpful info.
On the macOS 11 Big Sur beta, changes to how dynamic linking works breaks how zig searches for libraries.
On release 0.6.0, after creating the
zig0executable it throws this error:Unable to check cache: zig-cache/h: file not foundmake[2]: *** [CMakeFiles/zig_build_libstage2] Error 1make[1]: *** [CMakeFiles/zig_build_libstage2.dir/all] Error 2make: *** [all] Error 2Although master has a completely different error. Probably unrelated to the dylib change.
: CommandLine Error: Option 'mc-relax-all' registered more than once!LLVM ERROR: inconsistency in registered CommandLine optionsmake[2]: *** [CMakeFiles/zig_build_libstage2] Error 1make[1]: *** [CMakeFiles/zig_build_libstage2.dir/all] Error 2make: *** [all] Error 2On 0.6.0, removing the caching of libraries found via
_dyld_get_image_name()inError get_compiler_id(Buf **result)(compiler.cpp) allows zig to compile successfully. This seems to be due to_dyld_get_image_name()returning paths to libraries that were removed from the filesystem in the macOS beta.Even after compiling, running
./zig buildwill result inBuild Dependencies...lld: error: Unable to find library for -lSystemObviously not a super high priority as macOS 11 won't be released for some months.
This is my first time posting an issue here, so please let me know if I have failed to disclose any helpful info.