Compress size of libs directory?

18 views
Skip to first unread message

James Thorson

unread,
Mar 14, 2025, 9:56:23 AM3/14/25
to TMB Users
Hi all,

Does anyone know how to compress the "libs" directory (containing the compiled TMB code) for R packages on CRAN containing TMB models, particularly for Mac OS?

My package tinyVAST is immediately being taken down from CRAN, due to having a libs directory size that generates NOTES on CRAN checks (here). Strangely, the libs dir is 3.7 MB on Windows OS (both in CRAN checks and my local machine) and 93 MB on MacOS (on the CRAN checks, which I can't verify locally)

Jim

Ben Bolker

unread,
Mar 14, 2025, 10:31:40 AM3/14/25
to tmb-...@googlegroups.com
Are you sure that the library size is CRAN's specific problem? For
comparison, glmmTMB has a similarly large libraries on MacOS
<https://cran.r-project.org/web/checks/check_results_glmmTMB.html>, and
CRAN hasn't given us a hard time about it (it may be that we were
grandfathered in, though -- I don't think CRAN is entirely consistent in
the way they handle NOTEs ...)

What I see that is more concerning are the "additional issues"
(valgrind/clang-UBSAN errors), which eventually get down to

undefined-behavior
/data/gannet/ripley/R/test-clang/RcppEigen/include/Eigen/src/Core/MathFunctions.h:436:33
in
<https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-UBSAN/tinyVAST/build_vignettes.log>

and somewhere in
<https://www.stats.ox.ac.uk/pub/bdr/memtests/valgrind/tinyVAST/tinyVAST-Ex.Rout>
(haven't dug through ...)

cheers
Ben


On 3/14/25 09:56, James Thorson wrote:
> Hi all,
>
> Does anyone know how to compress the "libs" directory (containing the
> compiled TMB code) for R packages on CRAN containing TMB
> models, particularly for Mac OS?
>
> My package tinyVAST is immediately being taken down from CRAN, due to
> having a libs directory size that generates NOTES on CRAN checks (here
> <https://cran.r-project.org/web/checks/check_results_tinyVAST.html>).
> Strangely, the libs dir is 3.7 MB on Windows OS (both in CRAN checks and
> my local machine) and 93 MB on MacOS (on the CRAN checks, which I can't
> verify locally)
>
> Jim
>
> --
> To post to this group, send email to us...@tmb-project.org. Before
> posting, please check the wiki and issuetracker at https://github.com/
> kaskr/adcomp/ <https://github.com/kaskr/adcomp/>. Please try to create a
> simple repeatable example to go with your question (e.g issues 154, 134,
> 51). Use the issuetracker to report bugs.
> ---
> You received this message because you are subscribed to the Google
> Groups "TMB Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to tmb-users+...@googlegroups.com <mailto:tmb-
> users+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/tmb-
> users/CAMDbYvY%2B5ks-
> JktD13xPkk7ZjK1edarKPcD1h5beMfCh8GtuZw%40mail.gmail.com <https://
> groups.google.com/d/msgid/tmb-users/CAMDbYvY%2B5ks-
> JktD13xPkk7ZjK1edarKPcD1h5beMfCh8GtuZw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

--
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
* E-mail is sent at my convenience; I don't expect replies outside of
working hours.

Ben Bolker

unread,
Mar 14, 2025, 10:31:42 AM3/14/25
to tmb-...@googlegroups.com
Are you sure that the library size is CRAN's specific problem? For
comparison, glmmTMB has a similarly large libraries on MacOS
<https://cran.r-project.org/web/checks/check_results_glmmTMB.html>, and
CRAN hasn't given us a hard time about it (it may be that we were
grandfathered in, though -- I don't think CRAN is entirely consistent in
the way they handle NOTEs ...)

What I see that is more concerning are the "additional issues"
(valgrind/clang-UBSAN errors), which eventually get down to

undefined-behavior
/data/gannet/ripley/R/test-clang/RcppEigen/include/Eigen/src/Core/MathFunctions.h:436:33
in
<https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-UBSAN/tinyVAST/build_vignettes.log>

and somewhere in
<https://www.stats.ox.ac.uk/pub/bdr/memtests/valgrind/tinyVAST/tinyVAST-Ex.Rout>
(haven't dug through ...)

cheers
Ben


On 3/14/25 09:56, James Thorson wrote:
> Hi all,
>
> Does anyone know how to compress the "libs" directory (containing the
> compiled TMB code) for R packages on CRAN containing TMB
> models, particularly for Mac OS?
>
> My package tinyVAST is immediately being taken down from CRAN, due to
> having a libs directory size that generates NOTES on CRAN checks (here
> <https://cran.r-project.org/web/checks/check_results_tinyVAST.html>).
> Strangely, the libs dir is 3.7 MB on Windows OS (both in CRAN checks and
> my local machine) and 93 MB on MacOS (on the CRAN checks, which I can't
> verify locally)
>
> Jim
>

Kasper Kristensen

unread,
Mar 15, 2025, 5:20:07 AM3/15/25
to TMB Users
FWIW, the clang-UBSAN traceback linked to by Ben, has all the information needed to diagnose the problem: Line number 717 is:

DATA_IVECTOR( c_g );

which reads an integer vector containing NAs. This is a tricky case of undefined behavior in TMB, which is fortunately caught by CRAN's automated checks.
Reply all
Reply to author
Forward
0 new messages