godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.76k stars 3.06k forks source link

GDNative setup instructions fail on OSX #5396

Open tavurth opened 2 years ago

tavurth commented 2 years ago

Your Godot version: 3.4 stable

Issue description: I was following the instructions for setting up GDNative from the docs and they fail to compile on OSX stating unsupported architecture

The exact same build directive works fine on the example repository provided here however.

Errors are shown below

scons platform=osx generate_bindings=yes -j4 scons: Reading SConscript files ... src/gen: File exists src/gen: File exists scons: done reading SConscript files. scons: Building targets ... clang++ -o src/core/Basis.o -c -arch x86_64 -arch arm64 -std=c++14 -Og -g -I. -Igodot-headers -Iinclude -Iinclude/gen -Iinclude/core src/core/Basis.cpp clang++ -o src/core/PoolArrays.o -c -arch x86_64 -arch arm64 -std=c++14 -Og -g -I. -Igodot-headers -Iinclude -Iinclude/gen -Iinclude/core src/core/PoolArrays.cpp clang++ -o src/core/Vector3.o -c -arch x86_64 -arch arm64 -std=c++14 -Og -g -I. -Igodot-headers -Iinclude -Iinclude/gen -Iinclude/core src/core/Vector3.cpp clang++ -o src/core/CameraMatrix.o -c -arch x86_64 -arch arm64 -std=c++14 -Og -g -I. -Igodot-headers -Iinclude -Iinclude/gen -Iinclude/core src/core/CameraMatrix.cpp In file included from src/core/Vector3.cpp:31: In file included from include/core/Vector3.hpp:34: In file included from godot-headers/gdnative/vector3.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture #error Unsupported architecture ^ In file included from src/core/Vector3.cpp:31: In file included from include/core/Vector3.hpp:34: In file included from godot-headers/gdnative/vector3.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/Vector3.cpp:31: In file included from include/core/Vector3.hpp:34: In file included from godot-headers/gdnative/vector3.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_blkcnt_t; /* total blocks */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_blksize_t; /* preferred block size */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_dev_t; /* dev_t */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean 'uint64_t'? typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from src/core/Vector3.cpp:31: In file included from include/core/Vector3.hpp:34: In file included from godot-headers/gdnative/vector3.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t' typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t' typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_sigset_t; /* [???] signal set */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_uid_t; /* [???] user IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */ ^ In file included from src/core/Vector3.cpp:31: In file included from include/core/Vector3.hpp:34: In file included from godot-headers/gdnative/vector3.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:30: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/Vector3.cpp:31: In file included from include/core/Vector3.hpp:34: In file included from godot-headers/gdnative/vector3.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t' typedef __darwin_intptr_t intptr_t; ^ In file included from src/core/Vector3.cpp:31: In file included from include/core/Vector3.hpp:34: In file included from godot-headers/gdnative/vector3.h:54: In file included from godot-headers/gdnative/basis.h:54: In file included from godot-headers/gdnative/gdnative.h:143: In file included from godot-headers/gdnative/string.h:39: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. scons: *** [src/core/Vector3.o] Error 1 In file included from src/core/PoolArrays.cpp:31: In file included from include/core/PoolArrays.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture #error Unsupported architecture ^ In file included from src/core/PoolArrays.cpp:31: In file included from include/core/PoolArrays.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/PoolArrays.cpp:31: In file included from include/core/PoolArrays.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_blkcnt_t; /* total blocks */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_blksize_t; /* preferred block size */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_dev_t; /* dev_t */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean 'uint64_t'? typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from src/core/PoolArrays.cpp:31: In file included from include/core/PoolArrays.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t' typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t' typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_sigset_t; /* [???] signal set */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_uid_t; /* [???] user IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */ ^ In file included from src/core/PoolArrays.cpp:31: In file included from include/core/PoolArrays.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:30: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/PoolArrays.cpp:31: In file included from include/core/PoolArrays.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t' typedef __darwin_intptr_t intptr_t; ^ In file included from src/core/PoolArrays.cpp:31: In file included from include/core/PoolArrays.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:54: In file included from godot-headers/gdnative/pool_arrays.h:155: In file included from godot-headers/gdnative/color.h:54: In file included from godot-headers/gdnative/gdnative.h:143: In file included from godot-headers/gdnative/string.h:39: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. scons: *** [src/core/PoolArrays.o] Error 1 In file included from src/core/Basis.cpp:31: In file included from include/core/Basis.hpp:34: In file included from godot-headers/gdnative/basis.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture #error Unsupported architecture ^ In file included from src/core/Basis.cpp:31: In file included from include/core/Basis.hpp:34: In file included from godot-headers/gdnative/basis.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/Basis.cpp:31: In file included from include/core/Basis.hpp:34: In file included from godot-headers/gdnative/basis.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_blkcnt_t; /* total blocks */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_blksize_t; /* preferred block size */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_dev_t; /* dev_t */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean 'uint64_t'? typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from src/core/Basis.cpp:31: In file included from include/core/Basis.hpp:34: In file included from godot-headers/gdnative/basis.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t' typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t' typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_sigset_t; /* [???] signal set */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_uid_t; /* [???] user IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */ ^ In file included from src/core/Basis.cpp:31: In file included from include/core/Basis.hpp:34: In file included from godot-headers/gdnative/basis.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:30: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/Basis.cpp:31: In file included from include/core/Basis.hpp:34: In file included from godot-headers/gdnative/basis.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t' typedef __darwin_intptr_t intptr_t; ^ In file included from src/core/Basis.cpp:31: In file included from include/core/Basis.hpp:34: In file included from godot-headers/gdnative/basis.h:54: In file included from godot-headers/gdnative/gdnative.h:143: In file included from godot-headers/gdnative/string.h:39: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] In file included from src/core/CameraMatrix.cpp:31: In file included from include/core/CameraMatrix.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture #error Unsupported architecture ^ In file included from src/core/CameraMatrix.cpp:31: In file included from include/core/CameraMatrix.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/CameraMatrix.cpp:31: In file included from include/core/CameraMatrix.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_blkcnt_t; /* total blocks */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_blksize_t; /* preferred block size */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_dev_t; /* dev_t */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean 'uint64_t'? typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from src/core/CameraMatrix.cpp:31: In file included from include/core/CameraMatrix.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t' typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t' typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_sigset_t; /* [???] signal set */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_uid_t; /* [???] user IDs */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */ ^ In file included from src/core/CameraMatrix.cpp:31: In file included from include/core/CameraMatrix.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:30: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported #error architecture not supported ^ In file included from src/core/CameraMatrix.cpp:31: In file included from include/core/CameraMatrix.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdint.h:123: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t' typedef __darwin_intptr_t intptr_t; ^ In file included from src/core/CameraMatrix.cpp:31: In file included from include/core/CameraMatrix.hpp:34: In file included from include/core/Defs.hpp:90: In file included from include/core/GodotGlobal.hpp:34: In file included from include/core/Array.hpp:34: In file included from godot-headers/gdnative/array.h:54: In file included from godot-headers/gdnative/pool_arrays.h:155: In file included from godot-headers/gdnative/color.h:54: In file included from godot-headers/gdnative/gdnative.h:143: In file included from godot-headers/gdnative/string.h:39: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t' typedef __uint32_t __darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. scons: *** [src/core/Basis.o] Error 1 20 errors generated. scons: *** [src/core/CameraMatrix.o] Error 1 scons: building terminated because of errors.

URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/plugins/gdnative/gdnative-cpp-example.html

strau0106 commented 2 years ago

Anything new?

bruvzg commented 2 years ago

This error is most likely caused by using old Xcode with 10.15 SDK that supports only Intel macs, by default godot-cpp is building universal binary for both Intel and M1 macs.

This can be fixed by updating Xcode (to 12.2 or newer) or adding macos_arch=x86_64 to the build command to build Intel only binary.

strau0106 commented 2 years ago

Yes I figured that out about 2 Seconds ago lmao. Thanks! I just removed the -arch arm64 in the SConstruct file. but you mean passing macos_arch=x86_64 as an argument to SCons?