r - How can I improve the Makevars file for a Rcpp (RcppEigen) package? -
i have r package moved mcmc algorithm containing matrix algebra c++ using rcppeigen package dramatically improved speed.
however, r cmd check gives following note on linux (thanks r-forge):
* checking installed package size ... note installed size 6.6mb sub-directories of 1mb or more: libs 6.1mb this warning not driven incredible size of c++ code (which around 150 lines), appears on linux, inability correctly configure makevars file. (i have never used make or makefile before).
when submitting package cran, brian ripley wrote regarding note makes me expect makevars problem: "it comes debugging symbols."
my makevars standard rcpp makevars (given below) produced rcpp.package.skeleton.
my questions:
- how can configure
makevarsin way reduces size of compiled library on linux (i.e., rid ofnote)? - what resources on how magic of
makevarsrcpp?
(i didn't find in gallery , r extension manual on this incomprehensible me)
my makevars:
## use r_home indirection support installations of multiple r version pkg_libs = `$(r_home)/bin/rscript -e "rcpp:::ldflags()"` pkg_cppflags = -i. -i../inst/include my makevars.win:
## assume can call rscript ask rcpp locations ## use r_home indirection support installations of multiple r version pkg_libs = $(shell $(r_home)/bin/rscript.exe -e "rcpp:::ldflags()") pkg_cppflags = -i. -i../inst/include
you quote wrote. there nothing specific here: just want learn basic makefile syntax , options.
fiddling src/makevars, unless understand doing, not recommended. break something, particularly builds on architecture. simon urbanek pretty adamant advice.
brian ripley of course half-correct: if have debugging enabled, libraries larger. cxxflags never set, particularly no -g flag set turn debugging on. not us: if debugging enabled default, else turned on. r default. see .r/makevars.
the other driver size c++ templates. compare other packages using (rcpp)eigen, large too. "is cost of doing business": templates give (coding) power enjoy.
edited typos
Comments
Post a Comment