ITADN

'rchk' container breaks on recent R-devel: "Error in vapply : ... values must be length 1"

#96Openjameslamb 创建于 2026-01-04
J
jameslambcommented
## Description Coming here from https://github.com/microsoft/LightGBM/issues/7113 Consider something like the following: ```shell docker run \ --rm \ --platform linux/amd64 \ -it ghcr.io/r-hub/containers/rchk:latest \ bash curl -O https://cran.r-project.org/src/contrib/data.table_1.18.0.tar.gz r-check $(pwd) ``` This now fails like this: ```text Installing package * installing *source* package ‘data.table’ ... ** this is package ‘data.table’ version ‘1.18.0’ ** package ‘data.table’ successfully unpacked and MD5 sums checked not using staged install with --libs-only ** using non-staged installation /tmp/tmp.AUGHu8mxWY:11: *** missing separator. Stop. Warning in system2(file.path(R.home("bin"), "R"), c("CMD", "config", x), : running command ''/opt/R/devel-rchk/lib/R/bin/R' CMD config CC' had status 2 Error in vapply(ev1, function(x) system2(file.path(R.home("bin"), "R"), : values must be length 1, but FUN(X[[1]]) result is length 0 * removing ‘/opt/R/devel-rchk/packages/lib/data.table’ ``` ## Notes I think the root cause is this commit to R-devel: https://github.com/wch/r-source/commit/cf588ba6151d4c6cbecf5b4b9e15e6302b1d53f8 That added the following output to `R CMD config --all`: ```text ## The following variables are defunct CPP CXXCPP CXX11 CXX11STD CXX11FLAGS CXX11PICFLAGS CXX14 CXX14STD CXX14FLAGS CXX14PICFLAGS SHLIB_CXX11LD SHLIB_CXX11LDFLAGS SHLIB_CXX14LD SHLIB_CXX14LDFLAGS ``` That list of variables now ends up in the temporary `Makevars` added here: https://github.com/r-hub/containers/blob/a68e479cc4bd57d824a13fe4ef093c75cb209fd7/builder/rchk.sh#L14-L20 I'll put up a PR to fix this.
0 条评论