Re: [Bioc-devel] xcms error with R CMD check "checking loading without being on the library search path"

2024-03-14 Thread Rainer Johannes
Dear Mike,

thanks for the excellent explanation - and yes, I think you're right (after 
some feedback also from Vince and Herve). I did re-save the objects bundled 
within xcms with a fresh installation and am now re-running a bunch of tests 
with different containers.

thanks!
jo

Johannes Rainer, PhD

Eurac Research
Institute for Biomedicine
Via A.-Volta 21, I-39100 Bolzano, Italy

email: johannes.rai...@eurac.edu
github: jorainer
mastodon: jorai...@fosstodon.org

Mike Smith wrote:


Hi Johannes,

I think RCurl is imported via the package dependency chain of xcms -> 
SummarizedExperiment -> GenomeInfoDb -> RCurl.

It looks like Hervé removed this dependency from GenomeInfoDb recently 
(https://code.bioconductor.org/browse/GenomeInfoDb/commit/9562907f6800cf6052fff9fb2f85329ff44790b6),
 and the change is present in both RELEASE_3_18 and devel.  There was a post a 
few weeks ago about how a few heavily used CRAN packages are essentially 
abandoned (XML and RCurl) and there's been a bit of a concerted effort to move 
away from them in the core BioC packages if possible - hence why Hervé has made 
that change.

As for why R CMD check is complaining, my guess would be that you have some 
saved data in xcms that expects RCurl to be available when it is loaded - 
presumably this object was created when the dependency chain above was valid.  
Now GenomeInfoDb has been changed, RCurl doesn't get installed with xcms in a 
fresh R/Bioconductor install like your Docker container.  Then when you load 
the object via data() R complains about missing the expected RCurl package.  
That's just an educated guess, but seems plausible to me.

Best,
Mike

On Wed, 13 Mar 2024 at 10:10, Rainer Johannes 
mailto:johannes.rai...@eurac.edu>> wrote:
Dear all,

we're having some rather strange errors with R CMD check on the xcms package 
recently: it will fail with this warning (which then becomes an error):

✔  checking whether the namespace can be loaded with stated dependencies (5.9s)
✔  checking whether the namespace can be unloaded cleanly (6.1s)
W  checking loading without being on the library search path (5.3s)
   Loading required package: BiocParallel
   Loading required package: MSnbase
   Loading required package: BiocGenerics

   Attaching package: ‘BiocGenerics’

   The following objects are masked from ‘package:stats’:

   IQR, mad, sd, var, xtabs

   The following objects are masked from ‘package:base’:

   Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
   as.data.frame, basename, cbind, colnames, dirname, do.call,
   duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
   lapply, mapply, match, mget, order, paste, pmax, 
pmax.int, pmin,
   pmin.int, rank, rbind, rownames, sapply, setdiff, 
sort, table,
   tapply, union, unique, unsplit, which.max, which.min

   Loading required package: Biobase
   Welcome to Bioconductor

   Vignettes contain introductory material; view with
   'browseVignettes()'. To cite Bioconductor, see
   'citation("Biobase")', and for packages 'citation("pkgname")'.

   Loading required package: mzR
   Loading required package: Rcpp
   Loading required package: S4Vectors
   Loading required package: stats4

   Attaching package: ‘S4Vectors’

   The following object is masked from ‘package:utils’:

   findMatches

   The following objects are masked from ‘package:base’:

   I, expand.grid, unname

   Loading required package: ProtGenerics

   Attaching package: ‘ProtGenerics’

   The following object is masked from ‘package:stats’:

   smooth


   This is MSnbase version 2.28.1
 Visit https://lgatto.github.io/MSnbase/ to get started.


   Attaching package: ‘MSnbase’

   The following object is masked from ‘package:base’:

   trimws

   Loading required package: RCurl
   Error: package or namespace load failed for ‘xcms’ in 
.requirePackage(package):
unable to find required package ‘RCurl’
   In addition: Warning message:
   In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return 
= TRUE,  :
 there is no package called ‘RCurl’
   Execution halted

   It looks like this package has a loading problem when not on .libPaths:
   see the messages for details.


This is rather puzzling, since we're not using, requiring or importing RCurl at 
all. Also, so far I've never seen this check "checking loading without being on 
the library search path" before.

I will try to figure out what is going on and where/which package is causing 
this problem, but would be great if someone has a solution or at least a hint.

thanks!
jo

I was running this for xcms from the RELEASE_3_18 branch using the 
bioconductor/bioconductor_docker:RELEASE_3_18. The sessionInfo (after loading 
xcms):

> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS:   

Re: [Bioc-devel] xcms error with R CMD check "checking loading without being on the library search path"

2024-03-14 Thread Mike Smith
Hi Johannes,

I think RCurl is imported via the package dependency chain of xcms ->
SummarizedExperiment -> GenomeInfoDb -> RCurl.

It looks like Hervé removed this dependency from GenomeInfoDb recently (
https://code.bioconductor.org/browse/GenomeInfoDb/commit/9562907f6800cf6052fff9fb2f85329ff44790b6),
and the change is present in both RELEASE_3_18 and devel.  There was a post
a few weeks ago about how a few heavily used CRAN packages are essentially
abandoned (XML and RCurl) and there's been a bit of a concerted effort to
move away from them in the core BioC packages if possible - hence why Hervé
has made that change.

As for why R CMD check is complaining, my guess would be that you have some
saved data in xcms that expects RCurl to be available when it is loaded -
presumably this object was created when the dependency chain above was
valid.  Now GenomeInfoDb has been changed, RCurl doesn't get installed with
xcms in a fresh R/Bioconductor install like your Docker container.  Then
when you load the object via data() R complains about missing the expected
RCurl package.  That's just an educated guess, but seems plausible to me.

Best,
Mike

On Wed, 13 Mar 2024 at 10:10, Rainer Johannes 
wrote:

> Dear all,
>
> we're having some rather strange errors with R CMD check on the xcms
> package recently: it will fail with this warning (which then becomes an
> error):
>
> ✔  checking whether the namespace can be loaded with stated dependencies
> (5.9s)
> ✔  checking whether the namespace can be unloaded cleanly (6.1s)
> W  checking loading without being on the library search path (5.3s)
>Loading required package: BiocParallel
>Loading required package: MSnbase
>Loading required package: BiocGenerics
>
>Attaching package: ‘BiocGenerics’
>
>The following objects are masked from ‘package:stats’:
>
>IQR, mad, sd, var, xtabs
>
>The following objects are masked from ‘package:base’:
>
>Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
>as.data.frame, basename, cbind, colnames, dirname, do.call,
>duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
>lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
>pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
>tapply, union, unique, unsplit, which.max, which.min
>
>Loading required package: Biobase
>Welcome to Bioconductor
>
>Vignettes contain introductory material; view with
>'browseVignettes()'. To cite Bioconductor, see
>'citation("Biobase")', and for packages 'citation("pkgname")'.
>
>Loading required package: mzR
>Loading required package: Rcpp
>Loading required package: S4Vectors
>Loading required package: stats4
>
>Attaching package: ‘S4Vectors’
>
>The following object is masked from ‘package:utils’:
>
>findMatches
>
>The following objects are masked from ‘package:base’:
>
>I, expand.grid, unname
>
>Loading required package: ProtGenerics
>
>Attaching package: ‘ProtGenerics’
>
>The following object is masked from ‘package:stats’:
>
>smooth
>
>
>This is MSnbase version 2.28.1
>  Visit https://lgatto.github.io/MSnbase/ to get started.
>
>
>Attaching package: ‘MSnbase’
>
>The following object is masked from ‘package:base’:
>
>trimws
>
>Loading required package: RCurl
>Error: package or namespace load failed for ‘xcms’ in
> .requirePackage(package):
> unable to find required package ‘RCurl’
>In addition: Warning message:
>In library(package, lib.loc = lib.loc, character.only = TRUE,
> logical.return = TRUE,  :
>  there is no package called ‘RCurl’
>Execution halted
>
>It looks like this package has a loading problem when not on .libPaths:
>see the messages for details.
>
>
> This is rather puzzling, since we're not using, requiring or importing
> RCurl at all. Also, so far I've never seen this check "checking loading
> without being on the library search path" before.
>
> I will try to figure out what is going on and where/which package is
> causing this problem, but would be great if someone has a solution or at
> least a hint.
>
> thanks!
> jo
>
> I was running this for xcms from the RELEASE_3_18 branch using the
> bioconductor/bioconductor_docker:RELEASE_3_18. The sessionInfo (after
> loading xcms):
>
> > sessionInfo()
> R version 4.3.2 (2023-10-31)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 22.04.3 LTS
>
> Matrix products: default
> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;
> LAPACK version 3.10.0
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
>  [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
>  [9] LC_ADDRESS=C   LC_TELEPHONE=C
> 

[Bioc-devel] xcms error with R CMD check "checking loading without being on the library search path"

2024-03-13 Thread Rainer Johannes
Dear all,

we're having some rather strange errors with R CMD check on the xcms package 
recently: it will fail with this warning (which then becomes an error):

✔  checking whether the namespace can be loaded with stated dependencies (5.9s)
✔  checking whether the namespace can be unloaded cleanly (6.1s)
W  checking loading without being on the library search path (5.3s)
   Loading required package: BiocParallel
   Loading required package: MSnbase
   Loading required package: BiocGenerics

   Attaching package: ‘BiocGenerics’

   The following objects are masked from ‘package:stats’:

   IQR, mad, sd, var, xtabs

   The following objects are masked from ‘package:base’:

   Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
   as.data.frame, basename, cbind, colnames, dirname, do.call,
   duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
   lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
   pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
   tapply, union, unique, unsplit, which.max, which.min

   Loading required package: Biobase
   Welcome to Bioconductor

   Vignettes contain introductory material; view with
   'browseVignettes()'. To cite Bioconductor, see
   'citation("Biobase")', and for packages 'citation("pkgname")'.

   Loading required package: mzR
   Loading required package: Rcpp
   Loading required package: S4Vectors
   Loading required package: stats4

   Attaching package: ‘S4Vectors’

   The following object is masked from ‘package:utils’:

   findMatches

   The following objects are masked from ‘package:base’:

   I, expand.grid, unname

   Loading required package: ProtGenerics

   Attaching package: ‘ProtGenerics’

   The following object is masked from ‘package:stats’:

   smooth


   This is MSnbase version 2.28.1
 Visit https://lgatto.github.io/MSnbase/ to get started.


   Attaching package: ‘MSnbase’

   The following object is masked from ‘package:base’:

   trimws

   Loading required package: RCurl
   Error: package or namespace load failed for ‘xcms’ in 
.requirePackage(package):
unable to find required package ‘RCurl’
   In addition: Warning message:
   In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return 
= TRUE,  :
 there is no package called ‘RCurl’
   Execution halted

   It looks like this package has a loading problem when not on .libPaths:
   see the messages for details.


This is rather puzzling, since we're not using, requiring or importing RCurl at 
all. Also, so far I've never seen this check "checking loading without being on 
the library search path" before.

I will try to figure out what is going on and where/which package is causing 
this problem, but would be great if someone has a solution or at least a hint.

thanks!
jo

I was running this for xcms from the RELEASE_3_18 branch using the 
bioconductor/bioconductor_docker:RELEASE_3_18. The sessionInfo (after loading 
xcms):

> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  
LAPACK version 3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Etc/UTC
tzcode source: system (glibc)

attached base packages:
[1] stats4stats graphics  grDevices utils datasets  methods
[8] base

other attached packages:
[1] xcms_4.0.2  MSnbase_2.28.1  ProtGenerics_1.34.0
[4] S4Vectors_0.40.2mzR_2.36.0  Rcpp_1.0.11
[7] Biobase_2.62.0  BiocGenerics_0.48.1 BiocParallel_1.36.0

loaded via a namespace (and not attached):
 [1] bitops_1.0-7rlang_1.1.1
 [3] magrittr_2.0.3  clue_0.3-65
 [5] MassSpecWavelet_1.68.0  matrixStats_1.2.0
 [7] compiler_4.3.2  callr_3.7.3
 [9] vctrs_0.6.4 pkgconfig_2.0.3
[11] MetaboCoreUtils_1.11.1  crayon_1.5.2
[13] XVector_0.42.0  utf8_1.2.4
[15] ps_1.7.5preprocessCore_1.64.0
[17] MultiAssayExperiment_1.28.0 zlibbioc_1.48.0
[19] GenomeInfoDb_1.38.7 progress_1.2.3
[21] DelayedArray_0.28.0 parallel_4.3.2
[23] prettyunits_1.2.0   cluster_2.1.4
[25] R6_2.5.1RColorBrewer_1.1-3
[27] limma_3.58.1GenomicRanges_1.54.1
[29] SummarizedExperiment_1.32.0 iterators_1.0.14
[31] IRanges_2.36.0  igraph_2.0.2
[33] Matrix_1.6-5splines_4.3.2
[35] tidyselect_1.2.1abind_1.4-5
[37] doParallel_1.0.17   codetools_0.2-19
[39] affy_1.80.0