michalsta / opentims

Open-source C++ and Python module for opening binary timsTOF data files.
Other
41 stars 11 forks source link

Installation opentimsr: arguments (‘na.rm’) after ‘...’ must appear in the same place at the end of the argument list #25

Open sneumann opened 3 months ago

sneumann commented 3 months ago

Hi, on R-4.3.3 I am getting:

R CMD INSTALL /tmp/opentimsr_1.0.13.tar.gz
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘opentimsr’ ...
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
using C++17
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/Rcpp/include'     -fpic  -g -O2 -ffile-prefix-map=/build/r-base-14Q6vq/r-base-4.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c RcppExports.cpp -o RcppExports.o
...
g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o opentimsr.so RcppExports.o Rinterface.o converters.o opentims.o scan2inv_ion_mobility_converter.o so_manager.o thread_mgr.o tof2mz_converter.o zstddec_cpl.o -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/00LOCK-opentimsr/00new/opentimsr/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Error : in method for ‘range’ with signature ‘x="OpenTIMS"’:  arguments (‘na.rm’) after ‘...’ in the generic must appear in the method, in the same place at the end of the argument list
Error: unable to load R code in package ‘opentimsr’
Execution halted
ERROR: lazy loading failed for package ‘opentimsr’
* removing ‘/usr/local/lib/R/site-library/opentimsr’

with

R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.4 LTS
sneumann commented 3 months ago

Hi again, I can confirm installation works in R-4.3.2:

docker run -it --rm --entrypoint=/usr/local/bin/R rocker/r-ver:4.3.2 -e 'install.packages("devtools") ; devtools::install_github("michalsta/opentims", subdir="opentimsr")'

but fails in R-4.3.3: docker run -it --rm --entrypoint=/usr/local/bin/R rocker/r-ver:4.3.3 -e 'install.packages("devtools") ; devtools::install_github("michalsta/opentims", subdir="opentimsr")'

There is no na.rm I could find

and any ... looked insuspicious

and the Method definition for range also looks normal

The only relevant hint I see is that in plain R without anything loaded there is

> range
function (..., na.rm = FALSE)  .Primitive("range")

but I have no idea how that plays/collides with the method definition :-(

Yours, Steffen

MichelMoser commented 2 months ago

Dear @sneumann ,

Did your changes in opentimsr.R function(x, from, to, by=1L, na.rm=FALSE){ solve the installation problems in R4.3.3 ? I run into the same issue and would love to use opentimsr with the latest R version.

Thank you and best regards, Michel