Decrease size of library build to less than 5MB
bertcarnell opened this issue · 4 comments
bertcarnell commented
Fedora Clang build is currently over the 5 MB limit
Version: 1.1.1
Check: installed package size
Result: NOTE
installed size is 5.8Mb
sub-directories of 1Mb or more:
libs 5.4Mb
Flavor: r-devel-linux-x86_64-fedora-clang
https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-devel-linux-x86_64-fedora-clang
bertcarnell commented
Possible culprits include the sstream and iostream libraries.
- ensure c++ libraries are dynamically linked to keep some of the std library functionality out of the library
- try to remove sstream and iostream and do everyting in the std::string library
bertcarnell commented
Stripping debug symbols does the trick, but now there are 2 new questions
- Is this a good idea? debug symbols are defined by default for shared libraries in R, which means the R core team thinks they are important
- The -Wl,-S flag works for g++ and clang++, but will it also work on Solaris? Can I make sure it won't be passed to Solaris?
bertcarnell commented
Another option might be to include directions on how to build and install a debug version.
bertcarnell commented
CRAN checks no longer warn on library size over 5MB. Since other efforts were not successful at addressing for future versions, closing the issue.