Hello, I'm trying to install RSoptsc on the cluster and I'm having problems with the BipocNeighbor dependency.
I copied and pasted the whole error message below.
I also tried to install the package separately in different ways but nothing works. I did not have this problem when I installed RSoptsc locally.
Any advice?
Thank you very much in advance.
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:
/users/k1642876/R/x86_64-pc-linux-gnu-library/3.6/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);
^~~~~~~~~~~~~~~~~
In file included from annoy.cpp:97:0:
build_annoy.cpp: In instantiation of ‘Rcpp::RObject build_annoy_internal(Rcpp::NumericMatrix, int, const string&) [with Distance = Manhattan; Rcpp::RObject = Rcpp::RObject_ImplRcpp::PreserveStorage; Rcpp::NumericMatrix = Rcpp::Matrix<14>; std::__cxx11::string = std::__cxx11::basic_string]’:
build_annoy.cpp:26:66: required from here
build_annoy.cpp:14:13: error: request for member ‘add_item’ in ‘obj’, which is of non-class type ‘Annoy::_index {aka int}’
obj.add_item(i, tmp.data());
~~~~^~~~~~~~
build_annoy.cpp:17:9: error: request for member ‘build’ in ‘obj’, which is of non-class type ‘Annoy::_index {aka int}’
obj.build(Ntrees);
~~~~^~~~~
build_annoy.cpp:18:9: error: request for member ‘save’ in ‘obj’, which is of non-class type ‘Annoy::_index {aka int}’
obj.save(Fname.c_str());
~~~~^~~~
build_annoy.cpp: In instantiation of ‘Rcpp::RObject build_annoy_internal(Rcpp::NumericMatrix, int, const string&) [with Distance = Euclidean; Rcpp::RObject = Rcpp::RObject_ImplRcpp::PreserveStorage; Rcpp::NumericMatrix = Rcpp::Matrix<14>; std::__cxx11::string = std::__cxx11::basic_string]’:
build_annoy.cpp:28:66: required from here
build_annoy.cpp:14:13: error: request for member ‘add_item’ in ‘obj’, which is of non-class type ‘Annoy::_index {aka int}’
obj.add_item(i, tmp.data());
~~~~^~~~~~~~
build_annoy.cpp:17:9: error: request for member ‘build’ in ‘obj’, which is of non-class type ‘Annoy::_index {aka int}’
obj.build(Ntrees);
~~~~^~~~~
build_annoy.cpp:18:9: error: request for member ‘save’ in ‘obj’, which is of non-class type ‘Annoy::_index {aka int}’
obj.save(Fname.c_str());
~~~~^~~~
make: *** [annoy.o] Error 1
ERROR: compilation failed for package ‘BiocNeighbors’
- removing ‘/users/k1642876/R/x86_64-pc-linux-gnu-library/3.6/BiocNeighbors’
Error: Failed to install 'RSoptSC' from GitHub:
(converted from warning) installation of package ‘BiocNeighbors’ had non-zero exit status