On 25 November 2016 at 12:41, Dean Bodenham wrote: | I have written an R package using Rcpp that has recently been accepted to CRAN. | However, on a few systems the installed size ("libs" directory) is much larger | than on other systems, which leads to a couple of NOTEs: | https://cran.r-project.org/web/checks/check_results_ffstream.html | | Here is an example of this discrepancy that I have observed on two (of my own) | machines: | | | Operating system | Size | ----------------------------|--------- | OSX 10.10.5 | 1.1 MB | Ubuntu 16.04 (Linux Mint 18)| 9.0 MB | | | Has anyone seen this problem before? | | The package should survive with the NOTEs, but it would be good to fix it if | possible. | | [Although the various (test) systems on CRAN use different versions of the | compiler(s), which may affect things, I realise it is more likely that I have | made a mistake when writing/structuring the code.]
I don't think it is you. Run 'R CMD INSTALL ...' on both systems, I bet one is running with -g and the other is not. Those add debugging symbols, and they are HUGE. Dan Dillon has some experimental code to provide a stripping plugin. Until then, and just for local tests, do something like this in src/Makevars: PKG_LIBS= -Wl,-S This asks the linker to use -S to strip debugging symbols (but not general symbols, which R needs). On my Ubuntu 16.04 box I get a change from 9.0 mb (default) to 734 kb (with stripping) for twelve-fold reduction in size _on the same system_. If/when we have something more general I am sure it will be announced here. If you want to play with the plugin hit me and/or Dan (CC'ed). Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel