corrode
corrode copied to clipboard
The symbol `bsd_signal` does not fit here.
Getting this error on macOS, trying to use corrode with a signal.h inclusion.
/usr/include/signal.h:79: (column 19) [ERROR] >>> Syntax Error !
Syntax error !
The symbol `bsd_signal' does not fit here.
this is the line in that header:
void (* _Nullable bsd_signal(int, void (* _Nullable)(int)))(int);
That's wrapped in a #ifndef _ANSI_SOURCE
so, passing -D__DARWIN_C_LEVEL=200112
is a workaround for this. This setting seems to be the max for the system, that probably raises the minimum macOS version for targets.
Perhaps instead of a bug, what is needed is a standard definition of compiler flags for macOS?
related: #81 , #82 , #99
Similar issue with
/usr/include/pthread.h:243: (column 20) [ERROR] >>> Syntax Error !
Syntax error !
The symbol `*' does not fit here.
adding -D"_Nullable=/**/" -D"_Nonnull=/**/"
gets passed pthread.h
Another system header:
("/usr/include/math.h": line 205): illegal undefined variable; check whether a real C compiler accepts this:
__builtin_fabsf
adding -ffast-math
will get rid of this.
I have similar:
/usr/include/stdio.h:133: (column 19) [ERROR] >>> Syntax Error !
Syntax error !
The symbol `_close' does not fit here.
Even with the most trivial of .c programs. Using latest macOS
This may be addressed by https://github.com/jameysharp/corrode/pull/110