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

Installation error for R 4.0.0. Redhat 7.4 #23

Open
as7a5 opened this issue Dec 18, 2020 · 1 comment
Open

Installation error for R 4.0.0. Redhat 7.4 #23

as7a5 opened this issue Dec 18, 2020 · 1 comment

Comments

@as7a5
Copy link

as7a5 commented Dec 18, 2020

I get the following error. I appreciate your help:

  • installing source package ‘BiocNeighbors’ ...
    ** using staged installation
    ** libs
    g++ -std=gnu++11 -I"/gpfs/share/apps/R/4.0.0/lib64/R/include" -DNDEBUG -I'/gpfs/share/apps/R/4.0.0/lib64/R/library/Rcpp/include' -I'/gpfs/share/apps/R/4.0.0/lib64/R/library/RcppAnnoy/include' -I'/gpfs/share/apps/R/4.0.0/lib64/R/library/RcppHNSW/include' -I/usr/local/include -fpic -g -O2 -c RcppExports.cpp -o RcppExports.o
    g++ -std=gnu++11 -I"/gpfs/share/apps/R/4.0.0/lib64/R/include" -DNDEBUG -I'/gpfs/share/apps/R/4.0.0/lib64/R/library/Rcpp/include' -I'/gpfs/share/apps/R/4.0.0/lib64/R/library/RcppAnnoy/include' -I'/gpfs/share/apps/R/4.0.0/lib64/R/library/RcppHNSW/include' -I/usr/local/include -fpic -g -O2 -c annoy.cpp -o annoy.o
    In file included from annoy.cpp:1:0:
    annoy.h:33:63: error: wrong number of template arguments (4, should be 5)
    typedef AnnoyIndex<Index_t, Data_t, Distance, Kiss64Random> _index;
    ^
    In file included from annoy.h:17:0,
    from annoy.cpp:1:
    /gpfs/share/apps/R/4.0.0/lib64/R/library/RcppAnnoy/include/annoylib.h:845:9: note: provided for ‘template<class S, class T, class Distance, class Random, class ThreadedBuildPolicy> class AnnoyIndex’
    class AnnoyIndex : public AnnoyIndexInterface<S, T,
    ^~~~~~~~~~
    annoy.cpp: In constructor ‘Annoy::Annoy(int, const string&, double)’:
    annoy.cpp:7:9: error: request for member ‘load’ in ‘((Annoy)this)->Annoy::obj’, which is of non-class type ‘Annoy::_index {aka int}’
    obj.load(fname.c_str());
    ^~~~
    annoy.cpp: In member function ‘MatDim_t Annoy::get_nobs() const’:
    annoy.cpp:16:16: error: request for member ‘get_n_items’ in ‘((const Annoy
    )this)->Annoy::obj’, which is of non-class type ‘const _index {aka const int}’
    return obj.get_n_items();
    ^~~~~~~~~~~
    annoy.cpp: In member function ‘void Annoy::find_nearest_neighbors(CellIndex_t, NumNeighbors_t, bool, bool)’:
    annoy.cpp:44:9: error: request for member ‘get_nns_by_item’ in ‘((Annoy)this)->Annoy::obj’, which is of non-class type ‘Annoy::_index {aka int}’
    obj.get_nns_by_item(c, K + 1, get_search_k(K + 1), &kept_idx, dptr); // +1, as it forgets to discard 'self'.
    ^~~~~~~~~~~~~~~
    annoy.cpp: In member function ‘void Annoy::find_nearest_neighbors(const double
    , NumNeighbors_t, bool, bool)’:
    annoy.cpp:86:9: error: request for member ‘get_nns_by_vector’ in ‘((Annoy*)this)->Annoy::obj’, which is of non-class type ‘Annoy::_index {aka int}’
    obj.get_nns_by_vector(holding.data(), K, get_search_k(K), &kept_idx, dptr);
    ^~~~~~~~~~~~~~~~~
    make: *** [annoy.o] Error 1
    ERROR: compilation failed for package ‘BiocNeighbors’
  • removing ‘/gpfs/share/apps/R/4.0.0/lib64/R/library/BiocNeighbors’
    ERROR: dependency ‘BiocNeighbors’ is not available for package ‘scater’
  • removing ‘/gpfs/share/apps/R/4.0.0/lib64/R/library/scater’
    ERROR: dependencies ‘BiocNeighbors’, ‘scater’ are not available for package ‘batchelor’
  • removing ‘/gpfs/share/apps/R/4.0.0/lib64/R/library/batchelor’
@LTLA
Copy link
Owner

LTLA commented Dec 18, 2020

I'm guessing you're still on BioC 3.11. Looks like knncolle/BiocNeighbors#17; scroll down to the bottom for the solution.

If you're on BioC 3.12 or higher (check with library(BiocManager)), just update your packages.

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

No branches or pull requests

2 participants