Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The symbol bsd_signal does not fit here. #109

Open
bluejekyll opened this issue Jan 27, 2017 · 4 comments
Open

The symbol bsd_signal does not fit here. #109

bluejekyll opened this issue Jan 27, 2017 · 4 comments

Comments

@bluejekyll
Copy link

bluejekyll commented Jan 27, 2017

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

@bluejekyll
Copy link
Author

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

@bluejekyll
Copy link
Author

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.

@CallumHoward
Copy link

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

@CallumHoward
Copy link

This may be addressed by #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants