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

RcppHNSW 0.6.0/hnswlib 0.8.0 may require defining HNSWLIB_ERR_OVERRIDE #23

Open
jlmelville opened this issue Dec 4, 2023 · 3 comments

Comments

@jlmelville
Copy link

hnswlib 0.8.0 was recently released, and adds calls to std::cerr, under some conditions. As part of preparing RcppHNSW for a new CRAN release, BiocNeighbors is causing a reverse dependency check failures due to triggering a CRAN check WARNING.

I am not sure how much CRAN cares about Bioconductor reverse dependency changes (or if it's a problem for this package to call std::cerr), but to fix this, you could create a header file like:

#include <Rcpp.h>

#define HNSWLIB_ERR_OVERRIDE Rcpp::Rcerr

#include "hnswlib.h"

and include that file wherever you are including hnswlib.h currently. I seem to recall there was something similar with hnswlib and using a #define to opt out of the non-standard optimizations for the distance calculations.

See nmslib/hnswlib#508 for more on the hnswlib side.

@LTLA
Copy link
Member

LTLA commented Dec 18, 2023

Thanks @jlmelville; sorry for the late reply. I've added the suggested #define to hnsw.h, which should cover all of the within-package usages of hnswlib.h (see 8abf622). This has been pushed to BioC-devel, and if it builds fine there (and if I remember), I'll push it to BioC-release.

@jlmelville
Copy link
Author

Thanks @LTLA I assume that I can just look at https://bioconductor.org/packages/release/bioc/html/BiocNeighbors.html and when it reaches 1.21.2 or above it's safe to retry the reverse dependency check?

@LTLA
Copy link
Member

LTLA commented Jan 6, 2024

Oops, forgot about this. Just pushed the same change to the release stream; in a few days, it should pop out as 1.20.2.

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