Closed j-woz closed 5 years ago
Handling R.home('include') here. CC @ncollier
The R header could be in: /usr/share/R/include (APT) R_HOME/lib/R/include (source build) ... others?
Tested this on Ubuntu 18.04 with R installed via apt and R integration enabled with:
# Enable R integration
ENABLE_R=1
# R_INSTALL is the directory returned in R by R.home()
# R_INSTALL=/path/to/R
# Define these if Rcpp and RInside are not autodetected
# RCPP_INSTALL=/path/to/Rcpp
# RINSIDE_INSTALL=/path/to/RInside
The non-standard location for R.h is found:
checking for /usr/lib/R/include/R.h... no
Using R include: /usr/share/R/include
But it looks like the include for this header file is missing when compiling src/tcl/r/rinside-adapter.C
CXX src/tcl/r/rinside-adapter.C
mpicxx -c -o src/tcl/r/rinside-adapter.o -g -Wall -O1 -fPIC -I . -I src/turbine -I src/tcl/turbine -I src/tcl/static-pkg/ -I /usr/include/mpi -I /home/nick/sfw/swift-t-171/lb/include -I /home/nick/sfw/swift-t-171/c-utils/include -I/home/nick/anaconda3/include -I/home/nick/anaconda3/include/python3.6m -I /usr/lib/R/include -I /home/nick/R/x86_64-pc-linux-gnu-library/3.4/RInside/include -I /home/nick/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include src/tcl/r/rinside-adapter.C
In file included from /home/nick/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include/RcppCommon.h:29:0,
from /home/nick/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include/Rcpp.h:27,
from /home/nick/R/x86_64-pc-linux-gnu-library/3.4/RInside/include/RInsideCommon.h:38,
from /home/nick/R/x86_64-pc-linux-gnu-library/3.4/RInside/include/RInside.h:26,
from src/tcl/r/rinside-adapter.h:14,
from src/tcl/r/rinside-adapter.C:4:
/home/nick/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include/Rcpp/r/headers.h:52:10: fatal error: R.h: No such file or directory
#include <R.h>
^~~~~
compilation terminated.
src/tcl/r/module.mk:13: recipe for target 'src/tcl/r/rinside-adapter.o' failed
That is what is returned for R.home('include') -- amazing...
Actually R.home('include') was correct, the Makefile was wrong.
Try 472d49f61
That did the trick. Compiled and simple R test worked.
Merged to master.
From @jozik