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

Building with -DNGT_QBG_DISABLED=ON still trying to link with LAPACK and BLAS #145

Closed mikepcw closed 11 months ago

mikepcw commented 11 months ago
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas

even though I passed -DNGT_QBG_DISABLED=ON to cmake and it seems to be configured properly:

$ cmake .. -DNGT_QBG_DISABLED=ON
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- VERSION: 2.1.1
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_BUILD_TYPE_LOWER: release
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP: TRUE (found version "5.0")  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- QBG is disabled.
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch/mikew/NGT/build

build_ngt.log

Full log attached.

masajiro commented 11 months ago

I have fixed this issue in my environment. What about this latest commit in your environment?

mikepcw commented 11 months ago

Indeed the fix works. Thanks for the quick turnaround :)