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

Fix for macOS build failing on Monterey (#278) #288

Merged
merged 2 commits into from
Apr 9, 2023
Merged

Fix for macOS build failing on Monterey (#278) #288

merged 2 commits into from
Apr 9, 2023

Conversation

torstenvl
Copy link
Contributor

Fixed an issue in cmake/FindPolarSSL.cmake where the system's
C compiler would be called directly without the shim to provide
access to standard system libraries. With this fix, building
on macOS no longer fails to find stdio.h ;)

Fixed an issue in cmake/FindPolarSSL.cmake where the system's
C compiler would be called directly without the shim to provide
access to standard system libraries. With this fix, building
on macOS no longer fails to find stdio.h ;)
@torstenvl
Copy link
Contributor Author

In Big Sur and Monterey, standard include and library directories are not automatically divined by /Library/Developer/CommandLineTools/usr/bin/cc and they are instead specified by the shim at /usr/bin/cc. I recommend just using the normal system cc as the macOS developers intended.

The best alternative approach would be to add build flags specifying -Wno-nullability-completeness -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib (the -Wno-nullability-completeness is to turn off a large number of warnings for stdio.h and - I imagine - many other standard headers).

 2022-08-01 at 1308  SS

@Aorimn
Copy link
Owner

Aorimn commented Sep 14, 2022

TBH I don't have such OS to test it on, so I'll merge this and have faith with you :)
Thanks for this contribution!

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 this pull request may close these issues.

2 participants