I am trying to get Caffe up and running on my Ubuntu 14.04 system. After downloading Caffe and installing all the dependencies (no GPU), I run make all, which runs smoothly. When I run make test, I get a mountain of errors.
CXX/LD -o .build_release/test/test_all.testbin src/caffe/test/test_caffe_main.cpp
/usr/bin/ld: warning: libopencv_core.so.3.0, needed by /usr/local/lib/libopencv_imgcodecs.so, may conflict with libopencv_core.so.2.4
/usr/bin/ld: warning: libopencv_imgproc.so.3.0, needed by /usr/local/lib/libopencv_imgcodecs.so, may conflict with libopencv_imgproc.so.2.4
.build_release/src/caffe/test/test_data_transformer.o: In function `caffe::MakeTempDir(std::string*)':
test_data_transformer.cpp:(.text._ZN5caffe11MakeTempDirEPSs[_ZN5caffe11MakeTempDirEPSs]+0x4a): undefined reference to `boost::filesystem::detail::temp_directory_path(boost::system::error_code*)'
test_data_transformer.cpp:(.text._ZN5caffe11MakeTempDirEPSs[_ZN5caffe11MakeTempDirEPSs]+0x60): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
test_data_transformer.cpp:(.text._ZN5caffe11MakeTempDirEPSs[_ZN5caffe11MakeTempDirEPSs]+0xe0): undefined reference to `boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*)'
test_data_transformer.cpp:(.text._ZN5caffe11MakeTempDirEPSs[_ZN5caffe11MakeTempDirEPSs]+0x107): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
.build_release/src/caffe/test/test_data_transformer.o: In function `caffe::MakeTempFilename(std::string*)':
test_data_transformer.cpp:(.text._ZN5caffe16MakeTempFilenameEPSs[_ZN5caffe16MakeTempFilenameEPSs]+0x87): undefined reference to `boost::filesystem::path::codecvt()'
test_data_transformer.cpp:(.text._ZN5caffe16MakeTempFilenameEPSs[_ZN5caffe16MakeTempFilenameEPSs]+0x340): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
.build_release/src/caffe/test/test_layer_factory.o: In function `caffe::LayerFactoryTest_TestCreateLayer_Test<caffe::CPUDevice<double> >::TestBody()':
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv]+0x7eb): undefined reference to `boost::filesystem::detail::temp_directory_path(boost::system::error_code*)'
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv]+0x809): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv]+0x8a7): undefined reference to `boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*)'
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIdEEE8TestBodyEv]+0x8d1): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
.build_release/src/caffe/test/test_layer_factory.o: In function `caffe::LayerFactoryTest_TestCreateLayer_Test<caffe::CPUDevice<float> >::TestBody()':
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv]+0x7eb): undefined reference to `boost::filesystem::detail::temp_directory_path(boost::system::error_code*)'
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv]+0x809): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv]+0x8a7): undefined reference to `boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*)'
test_layer_factory.cpp:(.text._ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv[_ZN5caffe37LayerFactoryTest_TestCreateLayer_TestINS_9CPUDeviceIfEEE8TestBodyEv]+0x8d1): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
.build_release/src/caffe/test/test_upgrade_proto.o: In function `caffe::NetUpgradeTest_TestUpgradeV1LayerType_Test::TestBody()':
test_upgrade_proto.cpp:(.text+0xd8c): undefined reference to `boost::filesystem::detail::temp_directory_path(boost::system::error_code*)'
test_upgrade_proto.cpp:(.text+0xdaa): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
test_upgrade_proto.cpp:(.text+0xe47): undefined reference to `boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*)'
test_upgrade_proto.cpp:(.text+0xe71): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make: *** [.build_release/test/test_all.testbin] Error 1
I figured out that I had multiple versions of OpenCV on my system. I tried removing one from the bash file. I modified the Makefile as per the instructions given here (Caffe with OpenCV 3 and NVIDIA Digits: OpenCV version conflict (2.4 vs 3.0)), but that is not working. I get another set of errors like this
CXX/LD -o .build_release/test/test_all.testbin src/caffe/test/test_caffe_main.cpp
/usr/bin/ld: cannot find -llibopencv_core.so.2.4
/usr/bin/ld: cannot find -llibopencv_highgui.so.2.4
/usr/bin/ld: cannot find -llibopencv_imgproc.so.2.4
/usr/bin/ld: cannot find -llibopencv_imgcodecs.so.2.4
/usr/bin/ld: cannot find -llibopencv_core.so.2.4
/usr/bin/ld: cannot find -llibopencv_highgui.so.2.4
/usr/bin/ld: cannot find -llibopencv_imgproc.so.2.4
collect2: error: ld returned 1 exit status
make: *** [.build_release/test/test_all.testbin] Error 1.
How do I rectify these errors?