You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to compile a simple test program for x86_64 FreeBSD from Apple Silicon / aarch64-darwin (MacOS 13.1 / Ventura).
$ tar -xf zig-macos-aarch64-0.10.0.tar.xz
$ zig-macos-aarch64-0.10.0/zig version0.10.0
$ cat <<'EOF' > main.cpp#include <iostream>int main() { std::cout << "hello, from c++!" << std::endl; return 0;}EOF
$ zig-macos-aarch64-0.10.0/zig cc -lc++ -o hello_world_cpp main.cpp
$ ./hello_world_cpphello, from c++!
$ zig-macos-aarch64-0.10.0/zig cc -lc++ -o hello_world_cpp -target x86_64-freebsd main.cppIn file included from /private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libunwind/src/UnwindLevel1.c:21:/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not foundIn file included from /private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libunwind/src/UnwindLevel1-gcc-ext.c:12:/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found#include_next <inttypes.h>#include_next <inttypes.h> ^~~~~~~~~~~~ ^~~~~~~~~~~~In file included from main.cpp:1:In file included from /private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libcxx/include/iostream:36:In file included from /private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libcxx/include/__assert:13:/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libcxx/include/__config:292:14: fatal error: 'sys/endian.h' file not foundIn file included from /private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libunwind/src/Unwind-seh.cpp# include <sys/endian.h>:13 ^~~~~~~~~~~~~~:/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libunwind/src/config.h:16:10: fatal error: 'assert.h' file not found#include <assert.h> ^~~~~~~~~~In file included from /private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/libunwind/src/Unwind-sjlj.c:14:/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.Av46yJjiYZ/zig-macos-aarch64-0.10.0/lib/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found#include_next <inttypes.h> ^~~~~~~~~~~~1 error generated.1 error generated.1 error generated.1 error generated.
$ 1 error generated.
I see the same behavior on homebrew-provided zig as the official downloaded binary I used above. I see the same behavior with env -i HOME=~ zig... (to make sure it's hopefully not something LLVM related in my environment).
Searching through issues, it seems similar / related to:
Zig Version
0.10.0
Steps to Reproduce and Observed Behavior
I'm trying to compile a simple test program for x86_64 FreeBSD from Apple Silicon / aarch64-darwin (MacOS 13.1 / Ventura).
I see the same behavior on homebrew-provided zig as the official downloaded binary I used above. I see the same behavior with
env -i HOME=~ zig...
(to make sure it's hopefully not something LLVM related in my environment).Searching through issues, it seems similar / related to:
zig cc
andzig c++
#8716Expected Behavior
I had hoped cross-compilation from aarch64-darwin to x86_64-freebsd would work.
The text was updated successfully, but these errors were encountered: