to build the nanodb package fails with the following errors
.
/usr/bin/ld: ../libfaiss_gpu.a(IVFFlat.cu.o):(.data.rel.ro._ZTVN5faiss3gpu18GpuScalarQuantizerE[_ZTVN5faiss3gpu18GpuScalarQuantizerE]+0x18): undefined reference to faiss::ScalarQuantizer::compute_codes(float const*, unsigned char*, unsigned long) const' /usr/bin/ld: ../libfaiss_gpu.a(IVFFlat.cu.o):(.data.rel.ro._ZTVN5faiss3gpu18GpuScalarQuantizerE[_ZTVN5faiss3gpu18GpuScalarQuantizerE]+0x20): undefined reference tofaiss::ScalarQuantizer::decode(unsigned char const, float, unsigned long) const'
/usr/bin/ld: ../libfaiss_gpu.a(IVFFlat.cu.o):(.data.rel.ro._ZTIN5faiss3gpu18GpuScalarQuantizerE[_ZTIN5faiss3gpu18GpuScalarQuantizerE]+0x10): undefined reference to typeinfo for faiss::ScalarQuantizer' /usr/bin/ld: ../libfaiss_gpu.a(IVFPQ.cu.o): in functionfaiss::gpu::IVFPQ::precomputeCodes_(faiss::Index)':
tmpxft_000003b1_00000000-6_IVFPQ.compute_87.cudafe1.cpp:(.text+0x1420): undefined reference to `faiss::FaissException::FaissException(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const, char const*, int)'
/usr/bin/ld: tmpxft_000003b1_00000000-6_IVFPQ.compute_87.cudafe1.cpp:(.text+0x142c): undefined reference to typeinfo for faiss::FaissException' /usr/bin/ld: tmpxft_000003b1_00000000-6_IVFPQ.compute_87.cudafe1.cpp:(.text+0x1430): undefined reference totypeinfo for faiss::FaissException'
collect2: error: ld returned 1 exit status
make[2]: [faiss/gpu/test/CMakeFiles/TestCodePacking.dir/build.make:109: faiss/gpu/test/TestCodePacking] Error 1
make[1]: [CMakeFiles/Makefile2:1810: faiss/gpu/test/CMakeFiles/TestCodePacking.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
It seems that the build procedure is complaining on the missing faiss-gpu module that is not available through pip. If the missing module is the problem, is it possible to build the module from source, and if so what would be the correct parameters to use?
Hi @stenhelge, thanks for reporting this - will add it to my list of build issues to debug. For now, would recommend just running dustynv/nanodb:r35.2.1 container image built for JetPack 5.1.
Using a jetson AGX Orin with
-- L4T_VERSION=35.2.1 -- JETPACK_VERSION=5.1 -- CUDA_VERSION=11.4.315 -- LSB_RELEASE=20.04 (focal)
to build the nanodb package fails with the following errors . /usr/bin/ld: ../libfaiss_gpu.a(IVFFlat.cu.o):(.data.rel.ro._ZTVN5faiss3gpu18GpuScalarQuantizerE[_ZTVN5faiss3gpu18GpuScalarQuantizerE]+0x18): undefined reference to, std::allocator > const&, char const , char const*, int)'
/usr/bin/ld: tmpxft_000003b1_00000000-6_IVFPQ.compute_87.cudafe1.cpp:(.text+0x142c): undefined reference to
faiss::ScalarQuantizer::compute_codes(float const*, unsigned char*, unsigned long) const' /usr/bin/ld: ../libfaiss_gpu.a(IVFFlat.cu.o):(.data.rel.ro._ZTVN5faiss3gpu18GpuScalarQuantizerE[_ZTVN5faiss3gpu18GpuScalarQuantizerE]+0x20): undefined reference to
faiss::ScalarQuantizer::decode(unsigned char const, float, unsigned long) const' /usr/bin/ld: ../libfaiss_gpu.a(IVFFlat.cu.o):(.data.rel.ro._ZTIN5faiss3gpu18GpuScalarQuantizerE[_ZTIN5faiss3gpu18GpuScalarQuantizerE]+0x10): undefined reference totypeinfo for faiss::ScalarQuantizer' /usr/bin/ld: ../libfaiss_gpu.a(IVFPQ.cu.o): in function
faiss::gpu::IVFPQ::precomputeCodes_(faiss::Index)': tmpxft_000003b1_00000000-6_IVFPQ.compute_87.cudafe1.cpp:(.text+0x1420): undefined reference to `faiss::FaissException::FaissException(std::__cxx11::basic_string<char, std::char_traitstypeinfo for faiss::FaissException' /usr/bin/ld: tmpxft_000003b1_00000000-6_IVFPQ.compute_87.cudafe1.cpp:(.text+0x1430): undefined reference to
typeinfo for faiss::FaissException' collect2: error: ld returned 1 exit status make[2]: [faiss/gpu/test/CMakeFiles/TestCodePacking.dir/build.make:109: faiss/gpu/test/TestCodePacking] Error 1 make[1]: [CMakeFiles/Makefile2:1810: faiss/gpu/test/CMakeFiles/TestCodePacking.dir/all] Error 2 make: *** [Makefile:146: all] Error 2It seems that the build procedure is complaining on the missing faiss-gpu module that is not available through pip. If the missing module is the problem, is it possible to build the module from source, and if so what would be the correct parameters to use?
Please advice