yahoojapan / NGT

Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data
Apache License 2.0
1.22k stars 112 forks source link

2.2.0 failed to build on macos #156

Closed chenrui333 closed 3 months ago

chenrui333 commented 3 months ago

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log ``` In file included from /tmp/ngt-20240410-94921-j9ktx0/NGT-2.2.0/lib/NGT/Index.cpp:18: /tmp/ngt-20240410-94921-j9ktx0/NGT-2.2.0/lib/NGT/Common.h:473:64: error: use of undeclared identifier 'getSystemHWM'; did you mean 'getSystemHWMStr'? static std::string getSystemHWMStr() { return sizeToString(getSystemHWM()); } ^~~~~~~~~~~~ getSystemHWMStr /tmp/ngt-20240410-94921-j9ktx0/NGT-2.2.0/lib/NGT/Common.h:473:24: note: 'getSystemHWMStr' declared here static std::string getSystemHWMStr() { return sizeToString(getSystemHWM()); } ^ /tmp/ngt-20240410-94921-j9ktx0/NGT-2.2.0/lib/NGT/Common.h:473:64: error: no viable conversion from 'std::string' (aka 'basic_string') to 'float' static std::string getSystemHWMStr() { return sizeToString(getSystemHWM()); } ^~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/string:1100:5: note: candidate function operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); } ^ /tmp/ngt-20240410-94921-j9ktx0/NGT-2.2.0/lib/NGT/Common.h:454:43: note: passing argument to parameter 'size' here static std::string sizeToString(float size) { ^ ```

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/8632462042/job/23663344412?pr=168536 relates to Homebrew/homebrew-core#168536

masajiro commented 3 months ago

V2.2.1 has been released addressing this issue.

chenrui333 commented 3 months ago

2.2.1 works for me, thanks @masajiro!