facebookresearch / faiss

A library for efficient similarity search and clustering of dense vectors.
https://faiss.ai
MIT License
31.64k stars 3.65k forks source link

#3793 breaks the CMake build #3886

Closed alexanderguzhva closed 2 months ago

alexanderguzhva commented 2 months ago

Summary

3793 has incorrect perf_tests/CMakeLists.txt file location. This seems to be a github offloading problem of Phabricator, because I see that the file in a corresponding commit is properly placed

I get the following error after trying to compile current master branch:

CC=clang-18 CXX=clang++-18 cmake -B build_rel -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DFAISS_OPT_LEVEL=avx2 .
-- The CXX compiler identification is Clang 18.1.8

...

-- Compiling and running to test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- success
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Compiling and running to test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Compiling and running to test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Compiling and running to test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Compiling and running to test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- Found OpenMP_C: -fopenmp=libomp (found version "5.1")
-- Found OpenMP: TRUE (found version "5.1")
-- Configuring done (11.1s)
CMake Error at perf_tests/CMakeLists.txt:23 (add_library):
  Cannot find source file:

    utils.cpp

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  Cannot find source file:

    bench_no_multithreading_rcq_search.cpp

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  Cannot find source file:

    bench_scalar_quantizer_accuracy.cpp

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  Cannot find source file:

    bench_scalar_quantizer_decode.cpp

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  Cannot find source file:

    bench_scalar_quantizer_distance.cpp

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  Cannot find source file:

    bench_scalar_quantizer_encode.cpp

CMake Error at perf_tests/CMakeLists.txt:23 (add_library):
  No SOURCES given to target: faiss_perf_tests_utils

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  No SOURCES given to target: bench_no_multithreading_rcq_search

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  No SOURCES given to target: bench_scalar_quantizer_accuracy

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  No SOURCES given to target: bench_scalar_quantizer_decode

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  No SOURCES given to target: bench_scalar_quantizer_distance

CMake Error at perf_tests/CMakeLists.txt:91 (add_executable):
  No SOURCES given to target: bench_scalar_quantizer_encode
mengdilin commented 2 months ago

Sorry about that, let me look into what's happening. Should be fixed now with https://github.com/facebookresearch/faiss/pull/3885/files merged