Closed scottgigante closed 3 years ago
Use the latest release version (1.8.1) or devel version (1.9.2).
I meet the same issue.
I am able to install the devel version with devtools::install_github('LTLA/BiocNeighbors')
.
However, it seems to me that there is no specific tag for the latest release version.
Is it available in one of the branches?
Just to be clear: this GitHub repository is solely for the developers.
For Bioconductor packages, the official source is, as one might expect, Bioconductor itself:
https://www.bioconductor.org/packages/release/bioc/html/BiocNeighbors.html (release) https://www.bioconductor.org/packages/devel/bioc/html/BiocNeighbors.html (devel)
But in this case, it seems to me that I can't directly install packages in Bioconductor 3.11 or 3.12 given I use R 3.6.
In that case, you'd be looking at:
https://www.bioconductor.org/packages/3.10/bioc/html/BiocNeighbors.html
The problem in your case is not with BiocNeighbors per se; it's because RcppAnnoy made backwards-incompatible changes, inherited from the Annoy C++ library itself. If you want to use BioC 3.10, the real fix is get an appropriately old version of RcppAnnoy - this should be possible with something like:
devtools::install_version("RcppAnnoy", "0.0.16", repos="http://cran.us.r-project.org")
Perhaps there is some tooling that downgrades CRAN for you automatically, but I don't ever do this, so I wouldn't know.
In any case, BioC 3.11 and below are now frozen; patches are only being delivered to 3.12 or higher. So unless you have a specific need to use R <= 3.6 (e.g., to reproduce old results), I'd suggest using the latest version.
@LTLA Thank you so much for the detailed explanation. I really appreciate it.
Some closing comments:
The latest release and devel versions of BiocNeighbors will vendor the RcppAnnoy C++ headers, for reproducibility reasons as discussed in jlmelville/uwot#69. As a side effect, this means that we will not be susceptible to backward incompatibilities introduced by Annoy library updates. Won't solve the problem in this case but it'll ensure that it won't happen again in the future.
If you must continue using R 3.6.3, the BiocManager functionality linked above may be useful. In particular:
# 166 corresponds to the last day of the 3.10 release.
options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/166"))
BiocManager::install("BiocNeighbors", version="3.10") # well, there's not much choice for version anyway.
This will reproduce the packages as of 28th April, see https://packagemanager.rstudio.com/client/#/repos/1/overview.
In file included from annoy.cpp(1):
annoy.h(33): error: too few arguments for class template "AnnoyIndex"
typedef AnnoyIndex<Index_t, Data_t, Distance, Kiss64Random> _index;
^
compilation aborted for annoy.cpp (code 2)
make: *** [] Error 2
ERROR: compilation failed for package ‘BiocNeighbors’
Different install error associated with the same Annoy library update. Also resolved by downgrading RcppAnnoy
to 0.0.16. Providing it in case anyone's searching for the same problem.
Hitting an installation error on Debian Stretch.
Session info: