nmslib / hnswlib

Header-only C++/python library for fast approximate nearest neighbors
https://github.com/nmslib/hnswlib
Apache License 2.0
4.11k stars 607 forks source link

Poetry add fails w/ error caused by "cc1plus: some warnings being treated as errors" #537

Open yailya opened 4 months ago

yailya commented 4 months ago

Hi The error arises when trying to install openai python library on

openSuse Tumbleweed 20240211 Python 3.11.8 gcc (SUSE Linux) 13.2.1 20240206 [revision 67ac78caf31f7cb3202177e6428a46d829b70f23]

./python_bindings/bindings.cpp: In member function ‘pybind11::object Index<dist_t, data_t>::getData(pybind11::object, std::string) [with dist_t = float; data_t = float]’:
  ./python_bindings/bindings.cpp:338:5: error: control reaches end of non-void function [-Werror=return-type]
    338 |     }
        |     ^
  ./hnswlib/hnswlib.h: At global scope:
  ./hnswlib/hnswlib.h:89:13: warning: ‘bool AVX512Capable()’ defined but not used [-Wunused-function]
     89 | static bool AVX512Capable() {
        |             ^~~~~~~~~~~~~
  cc1plus: some warnings being treated as errors
  error: command '/usr/bin/gcc' failed with exit code 1