<div dir="ltr"><div>Dear Dirk, </div><div><br></div><div>Thank you very much for your detailed replies! </div><div><br></div><div>The Ubuntu system does indeed seem to be using the -g flag. I did try a local compile/installation with the ~/.R/Makevars file you suggested, but couldn't quite get it to work - I get warnings "linking not done" for the .o files, and then an error that the "ffstream.so" file is not found.</div><div><br></div><div>But, even if it did work locally, then, as you say, relying on a Makevars file could lead to issues later when trying to get the package onto CRAN (I have encountered difficulties with this approach previously).</div><div><br></div><div>Perhaps I will leave the package as it is for the moment, but it is very good to know the reason why the libs directory is (sometimes) so large.</div><div><br></div><div>Thank you again for your help, and I will watch out for any future announcements about this issue.</div><div><br></div><div>Best regards,</div><div>Dean</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 25, 2016 at 2:38 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 25 November 2016 at 07:23, Dirk Eddelbuettel wrote:<br>
| Dan Dillon has some experimental code to provide a stripping plugin.  Until<br>
| then, and just for local tests, do something like this in src/Makevars:<br>
|<br>
|    PKG_LIBS= -Wl,-S<br>
|<br>
| This asks the linker to use -S to strip debugging symbols (but not general<br>
| symbols, which R needs).  On my Ubuntu 16.04 box I get a change from<br>
|<br>
|    9.0 mb    (default)<br>
|<br>
| to<br>
|<br>
|    734 kb    (with stripping)<br>
|<br>
| for twelve-fold reduction in size _on the same system_.<br>
|<br>
| If/when we have something more general I am sure it will be announced here.<br>
| If you want to play with the plugin hit me and/or Dan (CC'ed).<br>
<br>
</span>PS The reason we have not talked about this / used this more is that we think<br>
it raise the "not portable" flags at CRAN so we want to (ideally) do it with<br>
some code that behaves correctly.<br>
<br>
For local use in ~/.R/Makevars it is perfectly fine.<br>
<div class="HOEnZb"><div class="h5"><br>
Dirk<br>
<br>
--<br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
</div></div></blockquote></div><br></div>