You are not logged in.

#1 2020-05-17 14:30:26

jazznuts
Member
Registered: 2020-03-24
Posts: 20

Why is my makefile failing?

I am trying to compile the test script for the nvidia cuDNN library, but the makefile keeps on failing.

Here is the output of make clean && make:

rm -rf *o
rm -rf mnistCUDNN
Linking agains cublasLt = true
CUDA VERSION: 10020
TARGET ARCH: x86_64
HOST_ARCH: x86_64
TARGET OS: linux
SMS: 30 35 50 53 60 61 62 70 72 75
/opt/cuda/bin/nvcc -ccbin g++ -I/opt/cuda/include -I/opt/cuda/include -IFreeImage/include -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -o fp16_dev.o -c fp16_dev.cu
g++ -I/opt/cuda/include -I/opt/cuda/include -IFreeImage/include   -o fp16_emu.o -c fp16_emu.cpp
g++ -I/opt/cuda/include -I/opt/cuda/include -IFreeImage/include   -o mnistCUDNN.o -c mnistCUDNN.cpp
/opt/cuda/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -o mnistCUDNN fp16_dev.o fp16_emu.o mnistCUDNN.o -I/opt/cuda/include -I/opt/cuda/include -IFreeImage/include -L/opt/cuda/lib64 -L/opt/cuda/lib64 -lcublasLt -LFreeImage/lib/linux/x86_64 -LFreeImage/lib/linux -lcudart -lcublas -lcudnn -lfreeimage -lstdc++ -lm
/usr/bin/ld: mnistCUDNN.o: in function `showDevices()':
mnistCUDNN.cpp:(.text+0x728): undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/usr/bin/ld: mnistCUDNN.cpp:(.text+0x791): undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/usr/bin/ld: mnistCUDNN.cpp:(.text+0x7a0): undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/usr/bin/ld: mnistCUDNN.cpp:(.text+0x920): undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/usr/bin/ld: mnistCUDNN.cpp:(.text+0x999): undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/usr/bin/ld: mnistCUDNN.o:mnistCUDNN.cpp:(.text+0x9a8): more undefined references to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:232: mnistCUDNN] Error 1

Some research into the ld_library_path indicates that this might be caused by a failure to find the correct library, but these errors are pretty much nonsense to me. Any help is appreciated.

Offline

#2 2020-05-17 14:40:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,813

Offline

#3 2020-05-17 16:11:29

loqs
Member
Registered: 2014-03-06
Posts: 19,066

Re: Why is my makefile failing?

Offline

Board footer

Powered by FluxBB