[R-pkg-devel] gdb availability on r-devel-linux-x86_64-fedora-gcc

Jamie Lentin |ent|nj @end|ng |rom @hutt|ethre@d@com
Sat Aug 12 15:10:37 CEST 2023


Hello list,

Our package gadget3[0] has just started failing the "donttest" 
additional check[1] on r-devel-linux-x86_64-fedora-gcc, specifically:-

   > # Build the model in an isolated R session w/debugger
   > writeLines(TMB::gdbsource(g3_tmb_adfun(cpp, compile_flags = "-g", 
output_script = TRUE)))
   Error in system(cmd, intern = TRUE, ignore.stdout = FALSE, 
ignore.stderr = TRUE) :
     error in running command
   Calls: writeLines -> <Anonymous> -> system
   Execution halted

The system call in question is done by the TMB package[2], and not ours 
to tinker with:

   cmd <- paste("R --vanilla < ",file," -d gdb --debugger-args=\"-x",
                gdbscript,"\"")
   txt <- system(cmd,intern=TRUE,ignore.stdout=FALSE,ignore.stderr=TRUE)

My only vaguely reasonable guess is that gdb isn't available on the host 
in question (certainly R will be!). How likely is this? Is it worth 
trying to resubmit with the call wrapped with an "if (gdb is on the 
path)"?

If this is a silly idea, which I suspect it is, would a resubmission 
removing the example be accepted or just raise red flags? This is 
obviously cheating---and it's a useful example I'd rather keep---but I'm 
not sure we have many other options available to us.

This example isn't a problem when run elsewhere. The TMB package itself 
isn't failing[3], but there doesn't seem to be any examples exercising 
TMB::gdbsource() there.

Thanks for any help!

[0] https://CRAN.R-project.org/package=gadget3
[1] https://www.stats.ox.ac.uk/pub/bdr/donttest/gadget3.out
[2] 
https://github.com/kaskr/adcomp/blob/master/TMB/R/gdbsource.R#L40-L42
[3] https://cran.r-project.org/web/checks/check_results_TMB.html



More information about the R-package-devel mailing list