I recently installed llvm via brew with brew install llvm, in order to use clang with OpenMP, on Mac OS 10.15.4 Catalina
$ which clang
/usr/local/opt/llvm/bin/clang
$ clang -v
clang version 10.0.0
Target: x86_64-apple-darwin19.4.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
It appears I'm getting basic cmath errors when compiling c++ code, e.g.
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:317:9: error: no member named
'signbit' in the global namespace
using ::signbit;
~~^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:318:9: error: no member named
'fpclassify' in the global namespace
using ::fpclassify;
~~^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:319:9: error: no member named
'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:749:12: note:
'finite' declared here
extern int finite(double)
This makes me think that certain files are missing, perhaps via Xcode?
Any ideas how to fix this?