build fails on src/external/libtrace/libsystem_trace/unpack_buffer.m
aviumcaravan opened this issue · comments
Build Log
What is the build error?
In file included from /home/kluska/Sources/darling/src/external/libtrace/libsystem_trace/unpack_buffer.m:29:
In file included from /home/kluska/Sources/darling/src/external/libtrace/libsystem_trace/os_log_s.h:33:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/log.h:11:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/trace.h:34:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/xpc/xpc.h:23:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dispatch/dispatch.h:65:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup.h:30:
/home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup_object.h:125:15: error: expected ';' after top level declarator
os_workgroup_t _Nullable
^
;
/home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup_object.h:126:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
os_workgroup_create_with_port(const char *_Nullable name, mach_port_t mach_port);
^
/home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup_object.h:125:16: error: nullability specifier '_Nullable' cannot be applied to non-pointer type 'int'
os_workgroup_t _Nullable
there's also an implicit int declaration error somewhere with newer clang versions. not sure what's up with that.
System Information
What system are you building with?
Software | Version |
---|---|
Clang | 14.0.6 and 16.0.6 (both have the same issue) |
CMake | 3.28.1 |
Linux Kernel | 6.6.10-arch1-1 |
Darling | 5ee6a68 |
issue still prevails after updating the OS fully on 21/01/24 and pulling the repo w/ submodules at the time of writing, even after reconfiguring.
build issue still persists.
In file included from /home/kluska/Sources/darling/src/external/libtrace/libsystem_trace/unpack_buffer.m:29:
In file included from /home/kluska/Sources/darling/src/external/libtrace/libsystem_trace/os_log_s.h:33:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/log.h:11:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/trace.h:34:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/xpc/xpc.h:23:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dispatch/dispatch.h:65:
In file included from /home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup.h:30:
/home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup_object.h:125:15: error: expected ';' after top level declarator
os_workgroup_t _Nullable
^
;
/home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup_object.h:126:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
os_workgroup_create_with_port(const char *_Nullable name, mach_port_t mach_port);
^
/home/kluska/Sources/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/workgroup_object.h:125:16: error: nullability specifier '_Nullable' cannot be applied to non-pointer type 'int'
os_workgroup_t _Nullable
commit: f3b0ae0
Just a heads up, I probably won't have time to fix this issue for a while (currently busy with ARM64 stuff). I'll let you know if I push a commit to fix this issue.
managed to trace the issue back, it's src/external/libdispatch/os/workgroup_object.h
as indicated by the error backtrace; however, using stock macOS libdispatch and/or trying to swap around the _Nullable
and the struct type specifier did not help. what did happen, however, is that it turns out that the base macros preceding the function stub are in a format that's considered incomplete. the fault might be on LLVM's side.
closing, managed to fix it by finding and removing a stale OSFMK header i had on my host from GNU/Mach.
a stale OSFMK header i had on my host from GNU/Mach
Not that it matters, but please note that GNU Mach is based on CMU's (and Utah's) Mach, not OSF Mach. Unlike Apple's, which is based on OSF's Mach indeed (hence, "osfmk").
yeah, i know, i just had a stale symlink pretending to be OSF/MK for the sole purpose of fooling some build systems