Hello! I am working on an R package (GitHub - campbio/decontX: Methods for decontamination of single cell data) that used RStan and rstantools, and I am working to submit this package to the Bioconductor. However, it was rejected because src/DecontX.so and src/stanExports_shrinkage.o are more than 5MB. I am wondering if anyone has suggestions on how to make these files smaller?
I’m not sure how it’s compiling now, but GCC has directives to minimize size (usually at the expense of efficiency). First, you want to make sure it compiles without any debug info (-g0 for GCC) and that it compiles optimized for size (-Os for GCC). You can customize our make flags in make.local file as laid out in the RStan doc.
You might also try just having the user build the binaries, but that will require a C++ toolchain (but then you already have that if you have installed RStan).
) that has make flags but there are comments in them saying they are created by rstantools and should not be editted by hand. Is the make.local file something I can add to the package dir and rebuild the package? I am pretty new to this so really appreciate your detailed help!
Hey Andew, thanks for looking into the issue! I don’t have issue building the package. It’s the message thrown when I try to submit the package to bioconductor that 2 files are over 5MB, see the link. I also have a local screenshot to show the 2 files sizes on my local machine.