Faiss: Installation error: 'configure: error: Couldn't find libcuda'

Created on 21 Nov 2018  ·  2Comments  ·  Source: facebookresearch/faiss

Summary

Platform

OS: SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

Faiss version: git commit 87721af1294c0dc2008d0537d9082198a477ac3a

Faiss compilation options: Default, makefile.inc.Linux from example_makefiles with changed PYTHONCFLAGS and CUDAROOT = /usr/local/cuda-9.0

Running on:

  • [x] CPU
  • [ ] GPU

Interface:

  • [ ] C++
  • [x] Python

Reproduction instructions

I've tried to install FAISS:

RUN cd faiss/ && ./configure && make && make install
RUN cd faiss/ && make py

in Nvidia-docker:

FROM nvidia/cuda:9.0-base-ubuntu16.04 as base

with following packages:

cuda-cublas-9-0
cuda-cufft-9-0
cuda-curand-9-0
cuda-cusolver-9-0
cuda-cusparse-9-0
libcudnn7=7.2.1.38-1+cuda9.0
libnccl2=2.2.13-1+cuda9.0

However I get such error:

checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ supports C++11 features with -std=c++11... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for python... no
checking for python-config... no
configure: WARNING: You won't be able to build the python interface.
checking for swig... no
checking how to run the C++ preprocessor... g++ -std=c++11 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for nvcc... /usr/local/cuda/bin/nvcc
checking cuda.h usability... yes
checking cuda.h presence... yes
checking for cuda.h... yes
checking for cuInit in -lcuda... configure: error: in `/faiss':
no
configure: error: Couldn't find libcuda
See `config.log' for more details

I don't know why I get this error even though I don't want to compile the GPU part. I could not find any solution in the internet. Could you please help me?

install

Most helpful comment

Could you try ./configure --with-cuda=/dev/null?

All 2 comments

Could you try ./configure --with-cuda=/dev/null?

It works, thanks!

Was this page helpful?
0 / 5 - 0 ratings