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

silence macos warning #218

Conversation

timblechmann
Copy link

i was running into this compiler invocation error on two different macos computers. the error seems harmless, but nevertheless it's ugly and confuses devs.

i don't exactly like the fix of adding an implicit preprocessor path, but otoh the change is not very intrusive. thoughts?


on macos we are running into the following warning when trying to run
the system autodetection:

/Applications/Xcode11.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string.h:61:15:
fatal error: 'string.h' file not
      found
              ^~~~~~~~~~

it seems that the compiler cannot find the sdk root, so the c++ headers
cannot find the c headers. we therefore add the macos sdk path manually

on macos we are running into the following warning when trying to run
the system autodetection:

```
/Applications/Xcode11.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string.h:61:15:
fatal error: 'string.h' file not
      found
              ^~~~~~~~~~
```

it seems that the compiler cannot find the sdk root, so the c++ headers
cannot find the c headers. we therefore add the macos sdk path manually
@CLAassistant
Copy link

CLAassistant commented Mar 26, 2020

CLA assistant check
All committers have signed the CLA.

@czoido
Copy link
Contributor

czoido commented Sep 3, 2020

Hi @timblechmann,
Sorry for the late response.
Have you tried to set: export SDKROOT=$(xcodebuild -version -sdk macosx Path) (See: #159 (comment))
Please check if that solves your issue.

@czoido
Copy link
Contributor

czoido commented Sep 3, 2020

Related to: #159

@timblechmann
Copy link
Author

@czoido observations:

  • the warning does not seem to trigger with xcode-11.6 (i had been using this patch locally for months). it does trigger for xcode-10 though (and in the past it was triggered for 11.2)
  • running the echo | clang pipeline from terminal neither shows the error on either of these compilers (which is funny)
  • setting the SDKROOT environment variable seems to work around it (though i'd appreciate if i wouldn't need to do it manually)

@czoido
Copy link
Contributor

czoido commented Sep 3, 2020

Hi @timblechmann we have added this: #226 to the 0.16 milestone and that will also address this error. I'll close this one. Please check if that solves the issue, otherwise please feel free to reopen.
Thanks a lot

@czoido czoido closed this Sep 3, 2020
@czoido czoido removed the PR: Wait FB label Sep 3, 2020
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.

3 participants