简体   繁体   中英

no member named 'isinf' in the global namespace

I'm having problems compiling pretty much anything on my Mac (including for example xgboost), suggesting that the problem isn't with individual projects but with something that's wrong on my machine. Others in my team can compile things fine.

When I try and compile, I get errors like:

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'isinf' in the global namespace
using ::isinf;

all are problems in cmath .

I have:

  • Checked that cmake is up to date.
  • Completely removed and reinstalled Command Line Tools using xcode-select --install
  • Completely remove XCode and run sudo xcode-select --reset
  • Compared my make configure output with a coworker - it is identical, as are all versions of all tools/libraries
  • Checked for anything in brew that looks problematic - can't see anything. Brew doctor says I'm ready to brew (everything is fine).
  • Check my MacOS SDK is ok, it is (10.15)

Any issues on GitHub or here that I've found don't have an answer that points to the root cause of the issue.

What is going on here? At the very least, where can I look for more clues?

You may try to use the CommandLineTools SDK rather than the XCode.app SDK. Running "xcode-select --reset" will make the macOS fallback to use the XCode.app SDK.

#Check the current sdk
xcrun --show-sdk-path

#Change sdk
sudo xcode-select -s /Library/Developer/CommandLineTools          #Using CommandLineTools SDK
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer   #Using XCode.app SDK

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM