ssd-caffe make -j8 failed with error

138 views
Skip to first unread message

arpit rastogi

unread,
Dec 4, 2018, 7:50:37 AM12/4/18
to Caffe Users
Hi All,

I am trying to build ssd-caffe(), but facing below problem when give "make -j8":

CXX/LD -o .build_debug/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_debug/tools/convert_imageset.bin
CXX/LD -o .build_debug/tools/extract_features.bin
CXX/LD -o .build_debug/tools/compute_image_mean.bin
CXX/LD -o .build_debug/tools/get_image_size.bin
CXX/LD -o .build_debug/tools/caffe.bin
CXX/LD -o .build_debug/tools/create_label_map.bin
CXX/LD -o .build_debug/tools/convert_annoset.bin
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/convert_imageset.bin' failed
make: *** [.build_debug/tools/convert_imageset.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/caffe.bin' failed
make: *** [.build_debug/tools/caffe.bin] Error 1
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/upgrade_net_proto_text.bin' failed
make: *** [.build_debug/tools/upgrade_net_proto_text.bin] Error 1
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/compute_image_mean.bin' failed
make: *** [.build_debug/tools/compute_image_mean.bin] Error 1
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/create_label_map.bin' failed
make: *** [.build_debug/tools/create_label_map.bin] Error 1
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/convert_annoset.bin' failed
make: *** [.build_debug/tools/convert_annoset.bin] Error 1
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/get_image_size.bin' failed
make: *** [.build_debug/tools/get_image_size.bin] Error 1
.build_debug/lib/libcaffe.so: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_debug/tools/extract_features.bin' failed
make: *** [.build_debug/tools/extract_features.bin] Error 1

My Makefile.config looks like this:
USE_CUDNN := 1
OPENCV_VERSION := 3
BLAS := atlas
PYTHON_INCLUDE := /usr/include/python2.7 \
                /usr/lib/python2.7/dist-packages/numpy/core/include /root/ssd-caffe/python
PYTHON_LIB := /usr/lib/x86_64-linux-gnu
WITH_PYTHON_LAYER := 1
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

I have opencv3 in my system. and using Ubuntu16.04.

Can someone please advice if i am missing something and how to proceed?

Thanks
Arpit

arpit rastogi

unread,
Dec 4, 2018, 8:21:29 AM12/4/18
to Caffe Users
I think i found the solution. When I did below, issue got resolved:

PYTHON_LIB := /usr/lib
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

Reply all
Reply to author
Forward
0 new messages