-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
buildRelated to building (Makefile, CMake, etc.)Related to building (Makefile, CMake, etc.)
Description
Problem
I was trying to run the tests for a parser's Swift bindings on CI but it failed to build the tree-sitter package.
[5/23] Compiling stdlib.c
While building module 'Darwin' imported from /Users/runner/work/tree-sitter-test/tree-sitter-test/.build/checkouts/tree-sitter/lib/include/tree_sitter/api.h:10:
In file included from <module-includes>:74:
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/net/if_dl.h:93:2: error: unknown type name 'u_char'; did you mean 'char'?
93 | u_char sdl_len; /* Total length of sockaddr */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/net/if_dl.h:94:2: error: unknown type name 'u_char'; did you mean 'char'?
94 | u_char sdl_family; /* AF_LINK */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/net/if_dl.h:95:2: error: unknown type name 'u_short'; did you mean 'short'?
95 | u_short sdl_index; /* if != 0, system given index for interface */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/net/if_dl.h:96:2: error: unknown type name 'u_char'; did you mean 'char'?
96 | u_char sdl_type; /* interface type */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/net/if_dl.h:97:2: error: unknown type name 'u_char'; did you mean 'char'?
97 | u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/net/if_dl.h:98:2: error: unknown type name 'u_char'; did you mean 'char'?
98 | u_char sdl_alen; /* link level address length */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/net/if_dl.h:99:2: error: unknown type name 'u_char'; did you mean 'char'?
99 | u_char sdl_slen; /* link layer selector length */
| ^
While building module 'Darwin' imported from /Users/runner/work/tree-sitter-test/tree-sitter-test/.build/checkouts/tree-sitter/lib/include/tree_sitter/api.h:10:
In file included from <module-includes>:85:
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/pthread/spawn.h:65:34: error: unknown type name 'qos_class_t'
65 | qos_class_t __qos_class);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/pthread/spawn.h:88:34: error: unknown type name 'qos_class_t'
88 | qos_class_t * __restrict __qos_class);
| ^
While building module 'Darwin' imported from /Users/runner/work/tree-sitter-test/tree-sitter-test/.build/checkouts/tree-sitter/lib/include/tree_sitter/api.h:10:
In file included from <module-includes>:93:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/posix_sem.h:49:
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/proc.h:116:2: error: unknown type name 'u_int'
116 | u_int p_estcpu; /* Time averaged value of p_cpticks. */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/proc.h:121:2: error: unknown type name 'u_int'
121 | u_int p_swtime; /* Time swapped in or out. */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/proc.h:122:2: error: unknown type name 'u_int'
122 | u_int p_slptime; /* Time since last blocked. */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/proc.h:136:2: error: unknown type name 'u_char'; did you mean 'char'?
136 | u_char p_priority; /* Process priority. */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/proc.h:137:2: error: unknown type name 'u_char'; did you mean 'char'?
137 | u_char p_usrpri; /* User-priority based on p_cpu and p_nice. */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/proc.h:142:2: error: unknown type name 'u_short'; did you mean 'short'?
142 | u_short p_xstat; /* Exit status for wait; also stop signal. */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/proc.h:143:2: error: unknown type name 'u_short'; did you mean 'short'?
143 | u_short p_acflag; /* Accounting flags. */
| ^
While building module 'Darwin' imported from /Users/runner/work/tree-sitter-test/tree-sitter-test/.build/checkouts/tree-sitter/lib/include/tree_sitter/api.h:10:
In file included from <module-includes>:234:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/netinet/bootp.h:46:
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/netinet/ip.h:90:10: error: duplicate member 'ip_v'
90 | u_int ip_v:4, /* version */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/netinet/ip.h:87:6: note: previous declaration is here
87 | ip_v:4; /* version */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/netinet/ip.h:91:6: error: duplicate member 'ip_hl'
91 | ip_hl:4; /* header length */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/netinet/ip.h:86:10: note: previous declaration is here
86 | u_int ip_hl:4, /* header length */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/netinet/ip.h:197:10: error: duplicate member 'ipt_oflw'
197 | u_int ipt_oflw:4, /* overflow counter */
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/netinet/ip.h:194:6: note: previous declaration is here
194 | ipt_oflw:4; /* overflow counter */
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from /Users/runner/work/tree-sitter-test/tree-sitter-test/.build/checkouts/tree-sitter/lib/src/wasm_store.c:1:
/Users/runner/work/tree-sitter-test/tree-sitter-test/.build/checkouts/tree-sitter/lib/include/tree_sitter/api.h:10:10: fatal error: could not build module 'Darwin'
10 | #include <stdlib.h>
| ~~~~~~~~^
21 errors generated.
Steps to reproduce
Presumably running swift build
in this repo on macOS 14 should also result in the same error.
Expected behavior
It seems to me that api.h
is either missing some definition or header include.
Tree-sitter version (tree-sitter --version)
tree-sitter 0.25.6
Operating system/version
macOS 14.7.6
Metadata
Metadata
Assignees
Labels
buildRelated to building (Makefile, CMake, etc.)Related to building (Makefile, CMake, etc.)