Paul,
as Kevin pointed out you have a big mess in /usr/local - I'd recommend renaming
/usr/local/include and /usr//local/lib -- then you shouldn't need to set any
custom flags at all (at least in R 4.0.0).
Cheers,
Simon
> On 4/05/2020, at 9:34 AM, Paul Fishwick wrote:
>
> @Kevin: This worke
@Kevin: This worked great. Thanks. I deleted the line in ~/.R/Makevars and
inserted the line
defining CPPFLAGS as you suggested. Rcpp now works in R! I have not yet tried
to compile
a package from source in R but I am guessing (or hoping) that should now work.
In the mean time, I will read up on
> In file included from /usr/local/include/math.h:8:
The problem here is you have a bunch of headers in /usr/local/include
that are shadowing / overriding the "normal" system header files;
/usr/local/include/math.h being one of these (but I imagine there's
more).
To work around this, you'll have
It was a good suggestion. I went back to installing R 4.0 as you suggested. In
Rstudio, which I think
uses whatever R happens to be currently installed, I get into
a similar rcpp issue whenever I say “y” to compiling packages from source.
There seems
to be consistent disconnect of R finding ce
This is probably beyond my understanding at this point, but the solution I
offered worked for me with R 4.0 and it looks like this example is R 3.6
I vaguely remember some issues with interaction between older R version and
newer Xcode 11.4.1 so moving to R 4 might help
On Sun, May 3, 2020 at 9:2
Carl
First, thank you for this quick tip! I had no ~/.R directory and Makevars
didn’t exist when I searched
for it in Finder. So, I made the directdory ~/.R and then added a new file
“Makevars” to that directory.
I edited this file to add your PKG_CPPFLAGS:
(base) -5:.R paul$ more Makevar
I experienced similar issues on Mac and was able to fix by adding
PKG_CPPFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
to my .R/Makevars
My understanding is that Mac no longer uses the /usr/local/include so you
need to point it t
System: Mac OSX 11 (Catalina), Rstudio with R version 3.6.3 (but have also
tried 4.0 and 3.3),
Xcode version 11.4.1
Went to: http://adv-r.had.co.nz/Rcpp.html#rcpp-intro
and tried library(rcpp) which worked fine because I previously had
installed the rcpp package.
The following yields an error i