0

I have absolutely no clue with regards to c++, but when I try to compile brms models I get errormessages. Likewise, when I compile Rstan programs exactly the same thing happens. Most of the time I´m left with:

Error in compileCode(f, code, language = language, verbose = verbose) : 
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:653:25: error: no template named 'numeric_limits'  return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);                        ^fatal error: too many errors emitted, stopping now [-ferror-limit=]20 errors generated.make: *** [file101515b125541.o] Error 1

Likewise if I install libraries from source I get the samme error msg (or another header missing). So far I´ve tried to remove and reinstall command line tools without any help (multiple times) and I´ve tried this SO approach without any help. Any ideas what I can do apart from the above?

I´m on Big Sur 11.4 (intel), R 4.1.0.

❯ clang++ -Wp,-v -E -                                                                                                                                        ─╯
clang -cc1 version 12.0.5 (clang-1205.0.22.11) default target x86_64-apple-darwin20.5.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
 /Library/Developer/CommandLineTools/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) 

I´m currently running without any Makevars file, but I used to run this:

FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadm$
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++

LLVM_LOC = /usr/local/opt/llvm
CC=/usr/local/gfortran/bin/gcc -fopenmp
CXX=/usr/local/gfortran/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/Ma$

My Rprofile is also empty.

Misha
  • 3,114
  • 8
  • 39
  • 60

0 Answers0