Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recent versions do not install with R 3.6.3 (object '.S3method' not found) #335

Closed
aronatkins opened this issue Aug 11, 2023 · 5 comments
Closed

Comments

@aronatkins
Copy link

Error description

docker run -it --rm rocker/r-ver:3.6.3 R -s -e 'install.packages("box", repos = c(CRAN = "https://cran.rstudio.com"))'
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/box_1.1.3.tar.gz'
Content type 'application/x-gzip' length 553423 bytes (540 KB)
==================================================
downloaded 540 KB

* installing *source* package ‘box’ ...
** package ‘box’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c exports.c -o exports.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c lookup.c -o lookup.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unlock_env.c -o unlock_env.o
gcc -shared -L/usr/local/lib/R/lib -L/usr/local/lib -o box.so exports.o lookup.o unlock_env.o -L/usr/local/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/00LOCK-box/00new/box/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Error in get(name, envir = ns, inherits = FALSE) :
  object '.S3method' not found
Error: unable to load R code in package ‘box’
Execution halted
ERROR: lazy loading failed for package ‘box’
* removing ‘/usr/local/lib/R/site-library/box’

The downloaded source packages are in
	‘/tmp/RtmpAhxzSL/downloaded_packages’
Warning message:
In install.packages("box", repos = c(CRAN = "https://cran.rstudio.com")) :
  installation of package ‘box’ had non-zero exit status

R version

_
platform       x86_64-pc-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          3
minor          6.3
year           2020
month          02
day            29
svn rev        77875
language       R
version.string R version 3.6.3 (2020-02-29)
nickname       Holding the Windsock

‘box’ version

1.1.3

@aronatkins
Copy link
Author

Same error happens with GitHub version:

docker run -it --rm rocker/r-ver:3.6.3 R -s -e 'install.packages("remotes", repos = c(CRAN = "https://cran.rstudio.com")); remotes::install_github("klmr/box")'

@klmr
Copy link
Owner

klmr commented Aug 12, 2023

Ah this is annoying/stupid: the package doesn’t even need .S3method, it’s just in there to work around a combination of bugs in R CMD check. Now I need to make this already unnecessary code even more complex to account for old versions of R. 😭

@klmr klmr closed this as completed in dbabe32 Aug 12, 2023
@klmr
Copy link
Owner

klmr commented Aug 12, 2023

Actually is there a good reason to use R 3.6? I am thinking about dropping support for this version because it’s incredibly hard to get necessary build infrastructure packages to install for that version of R, so I basically cannot debug issues any more.

@aronatkins
Copy link
Author

I hit this while testing some changes to renv across a variety of R versions. I do not otherwise use box and don't have opinions about what R versions should be supported. The DESCRIPTION declared R >= 3.5.0, which made the problem feel worth reporting.

@klmr
Copy link
Owner

klmr commented Aug 13, 2023

I’m definitely grateful for the bug report.

I’ll probably have to drop support for older R versions at some point, since maintaining them is disproportionately time-consuming. I did drop support for v3.5 now since I couldn’t even get the regular CI/CD workflow to run on it (‘devtools’ no longer supports it). Working around this isn’t worth the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants