Caffe: Makefile:575: recipe for target '.build_release/src/gtest/gtest-all.o' failed

Created on 28 Nov 2016  Â·  6Comments  Â·  Source: BVLC/caffe

Hi, Anybody help me?
In caffe root catalog, i input "make" and it's builded success, then i input "make test" occured error.
My pc OS is ubuntu16.4,and all libs of caffe dependencies had installed. I have no idea.....
But i trained LeNet model success, just this problem i don't know how to solve.

/usr/include/c++/5/bits/stl_multiset.h:842:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/5/string:48:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /home/jiangwq/local_install/include/gtest/gtest.h:55,
from src/gtest/gtest-all.cpp:39:
/usr/include/c++/5/bits/stl_function.h:387:20: note: ‘const testing::internal::String’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’
{ return __x < __y; }
^
Makefile:575: recipe for target '.build_release/src/gtest/gtest-all.o' failed
make: * [.build_release/src/gtest/gtest-all.o] Error 1

Most helpful comment

Yes, but i forgot how i solve it, im sorry.

All 6 comments

Yes, but i forgot how i solve it, im sorry.

@jackculpepper r u kiding me?。。。。。==||

how did you solve this problem???

In my computer, there are two gtest directories: /usr/include/gtest and /usr/local/include/gtest, when run make test, according to the error message, it use /usr/local/include/gtest rather than /usr/inclue/gtest, so I mv the /usr/local/include/gtest to /usr/local/include/gtest_backup and then make clean; make -j12; make test -j12 again, the problem was solved.

I use a server with others, may be someone else would use /usr/local/include/gtest rather than /usr/include/gtest, so I mv /usr/local/include/gtest_backup /usr/local/include/gtest again, and then change the Makefile.config around line 94 as below

old

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

new

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

That also works.

Yes, but i forgot how i solve it, im sorry.

I have the same problem as you, do you remember how you solve it

I am having the same problem. make all and make pycaffe worked, but getting error in make test.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

greatgao picture greatgao  Â·  3Comments

shiorioxy picture shiorioxy  Â·  3Comments

dfotland picture dfotland  Â·  3Comments

Ruhjkg picture Ruhjkg  Â·  3Comments

inferrna picture inferrna  Â·  3Comments