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

source /cvmfs/
source /cvmfs/
source /cvmfs/

git clone
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
lxplus ~ $ which 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?


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

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:


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