I have updated Xcode and MacOS operating system to Monterey and now I am having a series of issues of making Rstudio to work as used to do.
In particular, now I am getting an error when I try to source with Rcpp
the code described in Rcpp with quad precision computation.
This is the error I get:
In file included from /usr/local/gfortran/include/c++/12.1.0/cmath:47,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27,
from quadexp.cpp:2:
/usr/local/gfortran/include/c++/12.1.0/bits/std_abs.h:38:15: fatal error: stdlib.h: No such file or directory
38 | #include_next <stdlib.h>
| ^~~~~~~~~~
compilation terminated.
make: *** [quadexp.o] Error 1
Do you have any idea of what does it mean? I checked in /usr/local/gfortran/include/c++/12.1.0/bits
and stdlib.h
is present.
This is my ~/.R/Makevars
:
LOC=/usr/local/gfortran
CC=$(LOC)/bin/gcc -fopenmp
CXX=$(LOC)/bin/g++ -fopenmp
CXX11 = $(LOC)/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe -I/usr/local/opt/llvm/include
LDFLAGS=-L$(LOC)/lib -Wl,-rpath,$(LOC)/lib,-L/usr/local/lib
CPPFLAGS=-I$(LOC)/include -I/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/usr/local/include
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
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++