caffe2_cpp_tutorial
caffe2_cpp_tutorial copied to clipboard
Link error : undefined reference to symbol
Hi, I got the following link error when building the project.
[ 54%] Linking CXX static library libcaffe2_cpp_gpu.a make[3]: Leaving directory '/home/zsy/caffe2_cpp_tutorial/build' [ 54%] Built target caffe2_cpp_gpu make[3]: Entering directory '/home/zsy/caffe2_cpp_tutorial/build' Scanning dependencies of target rnn make[3]: Leaving directory '/home/zsy/caffe2_cpp_tutorial/build' make[3]: Entering directory '/home/zsy/caffe2_cpp_tutorial/build' [ 55%] Building CXX object CMakeFiles/rnn.dir/src/caffe2/binaries/rnn.cc.o [ 57%] Linking CXX executable ../bin/rnn /usr/bin/ld: libcaffe2_cpp.a(net_gradient.cc.o): undefined reference to symbol 'ZN6caffe211OperatorDef8CopyFromERKS0' /usr/local/lib/libcaffe2_protos.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status CMakeFiles/rnn.dir/build.make:134: recipe for target '../bin/rnn' failed make[3]: *** [../bin/rnn] Error 1 make[3]: Leaving directory '/home/zsy/caffe2_cpp_tutorial/build' CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/rnn.dir/all' failed make[2]: *** [CMakeFiles/rnn.dir/all] Error 2 make[2]: Leaving directory '/home/zsy/caffe2_cpp_tutorial/build' Makefile:83: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/home/zsy/caffe2_cpp_tutorial/build' Makefile:4: recipe for target 'all' failed make: *** [all] Error 2
I have checked:
- caffe2 is installed correctly before.
- 'libcaffe2_protos.so' is in the right place '/usr/local/lib/'
So I have no idea of the reasons of this issue. Wish to get some help. Thanks!
Hi,
I have not been able to reproduce or track down this error. Sometimes these errors are related to a recent change in Caffe2. Would it be possible to build and install the latest Caffe2?
Thanks