Change the R default C/C++ compiler in Kubuntu Linux -


if 1 installs r package requires compilation via

r cmd install package.tar.gz

from bash, r uses default gcc compiler. happened r-package throws warning on cran 'clang' compiler setup, doesn't appear using gcc compiler.

in order reproduce warning on local machine, adjust local compiler settings used on cran-check servers.

i found out should possible change r default compiler creating makevars.in file somewhere in home folder, cannot find has located , has written there in order make r use 'clang' warning flags enabled instead of 'gcc'.

has switched on his/her linux system r default compiler gcc clang , give me hint how that?

my favourite method (and think detailed here before) use file ~/.r/makevars set

cflags +=             -o3 -wall -pipe -pedantic -std=gnu99 cxxflags +=           -o3 -wall -pipe -wno-unused -pedantic   #ver=-4.6 #ver=-4.7 ver=-4.8 cc=ccache gcc$(ver) cxx=ccache g++$(ver) shlib_cxxld=g++$(ver) fc=ccache gfortran f77=ccache gfortran make=make -j8  #cxx=clang++ #cc=clang 

and more allows switch clang++ instead of g++ , more.

i use ccache here in order accelerate repeated builds -- very useful r packages may alter package code not src/ files.

an alternative approach shell-script wrapper in set cc, cxx , else want modify.


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -