Skip to content

nvcc fatal: redefinition of argument 'std' #75

@mginabluebox

Description

@mginabluebox

Hi,

I was building graphvite from source but met the following errors during make:

[ 50%] Building CUDA object src/CMakeFiles/graphvite.dir/graphvite.cu.o
cd /scratch/tj810/gvl_project/graphvite/build/src && /share/apps/cuda/10.1.105/bin/nvcc  -Dgraphvite_EXPORTS -I/scratch/tj810/gvl_project/env/include -I/scratch/tj810/gvl_project/env/lib/python3.7/site-packages -I/scratch/tj810/gvl_project/env/include/python3.7m -I/scratch/tj810/gvl_project/graphvite/include -std=c++11 -gencode arch=compute_70,code=sm_70 -O3 -Xcompiler=-fPIC -Xcompiler=-fvisibility=hidden -Xcompiler=-fno-fat-lto-objects -std=c++03 -x cu -c /scratch/tj810/gvl_project/graphvite/src/graphvite.cu -o CMakeFiles/graphvite.dir/graphvite.cu.o
nvcc fatal   : redefinition of argument 'std'
make[2]: *** [src/CMakeFiles/graphvite.dir/graphvite.cu.o] Error 1
make[2]: Leaving directory `/scratch/tj810/gvl_project/graphvite/build'
make[1]: *** [src/CMakeFiles/graphvite.dir/all] Error 2
make[1]: Leaving directory `/scratch/tj810/gvl_project/graphvite/build'
make: *** [all] Error 2

Thanks in advance!

Edit: I was able to get rid of this error by commenting out CMAKE_CUDA_FLAGS line setting -std=c++11. However, I got a new error at the end of make :

[100%] Linking CUDA shared library ../lib/libgraphvite.so
/usr/bin/ld: cannot find -lfaiss
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libgraphvite.so] Error 1
make[1]: *** [src/CMakeFiles/graphvite.dir/all] Error 2
make: *** [all] Error 2

I was building without faiss using the -DNO_FAISS option for cmake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions