Rohan Saxena
Rohan Saxena

Reputation: 3328

Caffe build fails repeatedly

I am trying to compile the software OpenPose on an Ubuntu 14 machine. The installation script installs Caffe. While installing Caffe, I get the following error message:

CXX tools/upgrade_net_proto_text.cpp
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1

From here, I have tried running ldconfig, I use OpenCV 3.2.0, so I have uncommented that in the makefile. I have also tried updating the OpenCV path in ~/.bashrc but I am not sure if I did it correctly. I did:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

After each of these steps, I ran the install script again but it fails with the same error message (shown above) every time.

Upvotes: 3

Views: 672

Answers (1)

Eliethesaiyan
Eliethesaiyan

Reputation: 2322

I haven't seen anyone so far who successfully installed caffe with openCV 3.2.0,i faced the same problem and what i did was to downgrade to OpenCV 3.1.Another problem that came along was missing modules that are in open_contrib that you should install along opencv,i d refer you to this answer also related to OpenPose here

Upvotes: 4

Related Questions