Caffe Installation Problems

I get an error after running the last command:

sudo apt-get install -y git
git clone GitHub - BVLC/caffe: Caffe: a fast open framework for deep learning.
cd caffe && git checkout dev
cp Makefile.config.example Makefile.config

make -j 4 all

make -j 4 runtest -------> After 15 minutes of testing I get the following error:

F0618 11:23:23.786288 30901 db.hpp:109] Check failed: mdb_status == 0 (-30792 vs. 0) MDB_MAP_FULL: Environment mapsize limit reached
*** Check failure stack trace: ***
@ 0x432d9060 (unknown)
@ 0x432d8f5c (unknown)
@ 0x432d8b78 (unknown)
@ 0x432daf98 (unknown)
@ 0x43bd63fc caffe::db::LMDBTransaction::Put()
@ 0x1421a2 caffe::DBTest_TestWrite_Test<>::TestBody()
@ 0x24665c testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x240a82 testing::Test::Run()
@ 0x240b12 testing::TestInfo::Run()
@ 0x240bea testing::TestCase::Run()
@ 0x242442 testing::internal::UnitTestImpl::RunAllTests()
@ 0x242634 testing::UnitTest::Run()
@ 0x7d430 main
@ 0x43eec632 (unknown)

I have tried this twice now and get the same error. I’m not sure what is going on

Unfortunately the master branch of Caffe has a really large value for LMDB_MAP_SIZE in src/caffe/util/db.cpp, which confuses the 32-bit ARM processor on the Jetson, eventually leading to Caffe tests failing with errors like MDB_MAP_FULL: Environment mapsize limit reached. Caffe GitHub issue #1861 has some discussion about this and maybe it will be fixed eventually, but for the moment if you manually adjust the value from 1099511627776 to 536870912, you’ll be able to run all the Caffe tests successfully.

This information was gathered from three places:

http://planspace.org/20150614-the_nvidia_jetson_tk1_with_caffe_on_mnist/

Now the tests run successfully, but when I add the line:

build/tools/caffe time --model=models/bvlc_alexnet/deploy.prototxt --gpu=0

I get the following error message:
ubuntu@tegra-ubuntu:~/caffe$ build/tools/caffe time --model=models/bvlc_alexnet/deploy.prototxt --gpu=0
build/tools/caffe: error while loading shared libraries: libcaffe.so: cannot open shared object file: No such file or directory

You should compare where your executable thinks that the ‘libcaffe.so’ library is versus where it is actually located.

I can’t find the library anywhere

Actaully, its in the lib folder
caffe/build/lib

The path it tells is caffe/libcaffe.so

I cut the library and pasted it where the device thinks it is located (right in the caffe folder). Now it gets to this stage:

I0618 14:14:03.554016 27880 caffe.cpp:225] *** Benchmark begins ***
I0618 14:14:03.554700 27880 caffe.cpp:226] Testing for 50 iterations.

before saying “Killed”

Do you have any other applications running? It may be running out of memory. Try rebooting the machine, and then running the test.

Hmm it started working randomly…thanks!

I get an error right after I invoke the “make -j 4 all” command, When I get to the “make -j 4 all” step, I get:
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/common.cpp
CXX src/caffe/layers/deconv_layer.cpp
CXX src/caffe/layers/dropout_layer.cpp

Then I get a bunch of compile errors, about 300 or so lines of them, that have a lot to do with the ./include/caffe/ directory. Any advice? Thanks!

Hi I am trying to isntall caffe following the instructions in two days to a demo using the latest Jetpack 3.2

make all runs and completes but make test crashes out with

make test
LD .build_release/src/caffe/test/test_net.o
.build_release/lib/libcaffe-nv.so: undefined reference to cv::imread(cv::String const&, int)' .build_release/lib/libcaffe-nv.so: undefined reference to cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator >&, std::vector<int, std::allocator > const&)’
.build_release/lib/libcaffe-nv.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)’
I can’t find imencode anywhere on my machine and suspect there is something missing from the Makefile.

Any ideas?

Hi I am trying to isntall caffe following the instructions in two days to a demo using the latest Jetpack 3.2

make all runs and completes but make test crashes out with

make test
LD .build_release/src/caffe/test/test_net.o
.build_release/lib/libcaffe-nv.so: undefined reference to cv::imread(cv::String const&, int)' .build_release/lib/libcaffe-nv.so: undefined reference to cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator >&, std::vector<int, std::allocator > const&)’
.build_release/lib/libcaffe-nv.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)’
I can’t find imencode anywhere on my machine and suspect there is something missing from the Makefile.

Any ideas?

These are functions from opencv. Not sure, but I think these are in libopencv_imgproc.so.

If you have installed a custom version of opencv, you may have to change /usr/lib/pkgconfig/opencv.pc to be a link to your custom install version of opencv.pc.

If this is in the wrong place please point me at where I should be posting please

You may have to find which version(s) of opencv are installed on your jetson (I suppose you are building natively on jetson. If you are cross-compiling, it may be different).

You may try first to locate any opencv lib such as:

sudo find / -name 'libopencv*'

How many versions do you see ?