Installing ROOT with R on lxplus

Dear support,

trying to compile ROOT from source with R on lxplus using CMAKE, GLIB and R from LCG. Somehow CMAKE does not find R.

Here is what I do (following instructions from https://root.cern.ch/doc/master/md_bindings_r_doc_users-guide_ROOTR_Users_Guide.html):

source /cvmfs/sft.cern.ch/lcg/releases/LCG_97/CMake/3.14.3/x86_64-centos7-gcc8-opt/CMake-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_97/R/3.5.3/x86_64-centos7-gcc8-opt/R-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_97/glib/2.52.2/x86_64-slc6-gcc8-opt/glib-env.sh

git clone http://root.cern.ch/git/root.git
cd root
mkdir compile
cd compile

cmake -Dr=ON …

Getting the folllowing error:
– Could NOT find R (missing: R_INCLUDE_DIR R_LIBRARY)


Please read tips for efficient and successful posting and posting code

ROOT Version: HEAD
Platform: centos 7
_Compiler: gcc 8


Perhaps @oshadura can help? I actually wonder why ROOT isn’t already built with tmva-rmva in LCG since R is available. @ganis is this intended?

ROOT 6.20/04 is already installed with R bindings on lxplus:

lxplus ~ $ which root
/usr/bin/root
lxplus ~ $ which root-config
/usr/bin/root-config
lxplus ~ $ root-config --features
cxx11 asimage builtin_clang builtin_llvm dataframe davix dcache exceptions fftw3 fitsio fortran gdml
gfal gnuinstall gsl_shared gviz http fcgi mathmore memstat mlp minuit2 mysql odbc opengl pgsql 
pyroot pythia8 **r** roofit shadowpw shared soversion sqlite ssl tmva tmva-pymva tmva-rmva spectrum
unuran vmc x11 xml xrootd
lxplus ~ $ root --version
ROOT Version: 6.20/04
Built for linuxx8664gcc on Apr 01 2020, 08:28:48
From tags/v6-20-04@v6-20-04

Is there a particular reason you need to compile by hand?

Hello,

Thanks for your reply.
However why does this example not run:

https://github.com/root-project/root/blob/v6-20-04/tutorials/r/Function.C

Maybe you have in mind an explicit root macro example with R that works?

Also, I need specific packages in R such as ‘xgboost’ that are not necessarily installed in the lxplus R.
I am basically trying to reproduce this example:

http://oproject.org/pages/RMVA.html#installation

Thanks
Michele

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.