.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'

编译 caffe 问题

(base) root@24a70b9d7a81:/home/caffe-jacinto-new-17# make all -j16
CXX/LD -o .build_release/tools/create_label_map.bin
CXX/LD -o .build_release/tools/compute_image_mean.bin
CXX/LD -o .build_release/tools/convert_annoset.bin
CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_binary.bin
CXX/LD -o .build_release/tools/get_image_size.bin
CXX/LD -o .build_release/tools/caffe.bin
CXX/LD -o .build_release/tools/convert_imageset.bin
CXX/LD -o .build_release/tools/extract_features.bin
CXX/LD -o .build_release/examples/cifar10/convert_cifar_data.bin
CXX/LD -o .build_release/examples/mnist/convert_mnist_data.bin
CXX/LD -o .build_release/examples/cpp_classification/classification.bin
CXX/LD -o .build_release/examples/ssd/ssd_detect.bin
CXX/LD -o .build_release/examples/siamese/convert_mnist_siamese_data.bin
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:667: recipe for target '.build_release/examples/ssd/ssd_detect.bin' failed
make: *** [.build_release/examples/ssd/ssd_detect.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:667: recipe for target '.build_release/examples/siamese/convert_mnist_siamese_data.bin' failed
make: *** [.build_release/examples/siamese/convert_mnist_siamese_data.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:667: recipe for target '.build_release/examples/cpp_classification/classification.bin' failed
make: *** [.build_release/examples/cpp_classification/classification.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
Makefile:662: recipe for target '.build_release/tools/upgrade_solver_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_solver_proto_text.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
.build_releasecollect2: error: ld returned 1 exit status
/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
Makefile:662: recipe for target '.build_release/tools/get_image_size.bin' failed
make: *** [.build_release/tools/get_image_size.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target '.build_release/tools/create_label_map.bin' failed
make: *** [.build_release/tools/create_label_map.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target '.build_release/tools/compute_image_mean.bin' failed
make: *** [.build_release/tools/compute_image_mean.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target '.build_release/tools/convert_annoset.bin' failed
make: *** [.build_release/tools/convert_annoset.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
.collect2: error: ld returned 1 exit status
build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target '.build_release/tools/extract_features.bin' failed
make: *** [.build_release/tools/extract_features.bin] Error 1
Makefile:662: recipe for target '.build_release/tools/convert_imageset.bin' failed
make: *** [.build_release/tools/convert_imageset.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:667: recipe for target '.build_release/examples/cifar10/convert_cifar_data.bin' failed
make: *** [.build_release/examples/cifar10/convert_cifar_data.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:667: recipe for target '.build_release/examples/mnist/convert_mnist_data.bin' failed
make: *** [.build_release/examples/mnist/convert_mnist_data.bin] Error 1
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDestroy'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjInitDecompress'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompressHeader2'
.build_release/lib/libcaffe-nv.so: undefined reference to `tjDecompress2'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target '.build_release/tools/caffe.bin' failed
make: *** [.build_release/tools/caffe.bin] Error 1
(base) root@24a70b9d7a81:/home/caffe-jacinto-new-17# ^C
(base) root@24a70b9d7a81:/home/caffe-jacinto-new-17# ^C

首先查看系统有没有这个库:
我是如何知道是这个库的?
本地找到这个函数然后clion转到定义,显示到了usr/include/turbojpeg.h

locate libturbojpeg
locate: warning: database '/var/cache/locate/locatedb' is more than 8 days old (actual age is 41.3 days)
/usr/lib/x86_64-linux-gnu/libturbojpeg.so
/usr/lib/x86_64-linux-gnu/libturbojpeg.so.0
/usr/lib/x86_64-linux-gnu/libturbojpeg.so.0.1.0
/usr/share/doc/libturbojpeg
/usr/share/doc/libturbojpeg/changelog.Debian.gz
/usr/share/doc/libturbojpeg/copyright
/var/lib/dpkg/info/libturbojpeg:amd64.list
/var/lib/dpkg/info/libturbojpeg:amd64.md5sums
/var/lib/dpkg/info/libturbojpeg:amd64.postinst
/var/lib/dpkg/info/libturbojpeg:amd64.postrm
/var/lib/dpkg/info/libturbojpeg:amd64.shlibs
/var/lib/dpkg/info/libturbojpeg:amd64.triggers

显示系统是有这个库的,
再执行:
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
还是报一样的错误。
然后我知道了,拿没有问题的makefile查看。恩!需要在makefile里面加turbojpeg:

LIBRARIES += geos_c boost_system glog gflags protobuf boost_filesystem m turbojpeg 

加上这turbojpeg就可以了,编译通过不再报错!

posted @ 2022-06-02 16:59  无左无右  阅读(142)  评论(0编辑  收藏  举报