I’m trying to get pystan (2.18) working under Mojave and have found myself with the following dilemma. If I try to use the macOS gcc I get the following:
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
/var/folders/rn/5cyhvg_x591146y8khk9vqz40000gp/T/tmp8ku2bvdo/stanfit4logistic_regression_b34cbd6e4c4687ee64f335b5b2408384_7347898005404304860.cpp:675:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
1 warning and 1 error generated.
I’ve run xcode-select --install
. Here’s the gcc version info:
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
If I use gcc (GCC 4.8.5) installed with Anaconda 3 (5.3.0), I get
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /Users/jhuggins/anaconda3/envs/stan/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0,
from /Users/jhuggins/anaconda3/envs/stan/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,
from /Users/jhuggins/anaconda3/envs/stan/include/python3.6m/Python.h:11,
from /var/folders/rn/5cyhvg_x591146y8khk9vqz40000gp/T/tmp33mvc0fh/stanfit4logistic_regression_b34cbd6e4c4687ee64f335b5b2408384_8158677822526299729.cpp:57:
/Users/jhuggins/anaconda3/envs/stan/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
#include_next <limits.h> /* recurse down to the real one */
^