SSD编译的时候出现问题

/usr/include/boost/property_tree/detail/json_parser_read.hpp: In constructor ‘boost::property_tree::json_parser::json_grammar<Ptree>::definition<Scanner>::definition(const boost::property_tree::json_parser::json_grammar<Ptree>&)’:
/usr/include/boost/property_tree/detail/json_parser_read.hpp:257:264: error: ‘type name’ declared as function returning an array
                 escape
                                                                                                                                                                                                                                                                        ^
/usr/include/boost/property_tree/detail/json_parser_read.hpp:257:264: error: ‘type name’ declared as function returning an array
make: *** [.build_release/cuda/src/caffe/layers/detection_output_layer.o] Error 1
make: *** Waiting for unfinished jobs....
已邀请:

销矢_ch

赞同来自: 宋姚姚

换163源 或者中科大的源,另外可以自己编译,自己编译比较耗时。  如果你是cuda8.0的话,我这之后有遇到新的问题,想知道你会不会出现,可以的话,加个Q272377502.

销矢_ch

赞同来自:

你的gcc版本低于gcc 5 ,升级一下gcc

宋姚姚 - 92年理工女

赞同来自:

我用如下升级gcc:
1 sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
2 sudo apt-get update
3sudo apt-get install gcc-5 g++-5
运行第2步出现rux如下问题:
W: Failed to fetch http://mirrors.sohu.com/ubuntu ... kages  Hash Sum mismatch
W: Failed to fetch http://extras.ubuntu.com/ubunt ... urces  Hash Sum mismatch
W: Failed to fetch http://extras.ubuntu.com/ubunt ... kages  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead
我已经试了很多源,但还是zhe这个错误,有没有别 的升级gcc方法

持久决心 - 记录与分享是个好习惯

赞同来自:

楼主你好,我也遇到了同样的问题,升级gcc出现帖子中的错误:Ubuntu14.04升级gcc版本到5出错
能就这个问题请教或者交流一下吗^_^
plus:我也是在跑ssd遇到这个问题的

持久决心 - 记录与分享是个好习惯

赞同来自:

楼主,我手动安装了gcc5.3.0,之后编译又出现如下问题,希望你看到了能分享一下你遇到没有:
CXX/LD -o .build_release/tools/device_query.bin
CXX/LD -o .build_release/tools/test_net.bin
CXX/LD -o .build_release/tools/finetune_net.bin
CXX/LD -o .build_release/tools/get_image_size.bin
.build_release/lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<double>*>::pop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>,.build_release/lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<double>*>::pop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&)'
.build_release/lib/ libcaffe.sostd: :undefined: allocatorreference< charto> `>void >caffe :>: VisualizeBBox> <>double:>:(maybe_assignstd(:boost::vector:<match_resultscv<:__gnu_cxx::Mat:,__normal_iterator <stdchar: :constallocator*<,cv :std::Mat:>__cxx11 :>: basic_stringconst<&char,, caffestd::::Blobchar_traits<<doublechar>> const,* ,std :float:,allocator <stdchar:>: vector>< .cvbuild_release/lib>/,libcaffe.so: undefined: :reference to std::`caffe::BlockingQueueScalar_<<doublecaffe>::,Batch std<:double>allocator*<>::popboost(::sub_matchstd::__cxx11::basic_string:<allocator<charcv, <__gnu_cxx:std::char_traits<::Scalar_<double> char>>,: __normal_iterator<stdchar:: allocatorconst<char> > const& ,> *, std:const:&) 'std
.:build_release:/lib/__cxx11::basic_string<libcaffe.sochar: map<int, undefinedstd reference, to :`:boost::match_resultsstd<::__gnu_cxx::__normal_iterator<__cxx11::basic_stringchar constchar_traits*<char>,, std:<:char, __cxx11:: stdbasic_string<charstd:, std::allocator<char> :>:char_traits:<char_traitschar>, std<:char>:allocator<,char > >> >, stdstd::::allocator<boost :>:sub_match< > > __gnu_cxx::__normal_iteratorallocator<<char>char const&)'
.build_release/libconst/*, std: :>__cxx11:, std::less:basic_string<libcaffe.so: undefinedchar ,reference to ` voidstd:<int>, :stdchar_traits::allocator<<char>,std ::stdpair:: allocatorcaffe<char:>: > >< int> > VisualizeBBox><double>::maybe_assign const(boost(std:::vector:match_results,< __gnu_cxx::__normal_iteratorstd<:char const:__cxx11::*,basic_string<char std:<cv::Mat, std:::allocator<__cxx11cv::::basic_stringMat<>char ,> stdconst:&:,char_traits <caffechar:>:,Blob <stddouble:>: allocatorconst<*char,> float>, >std,: :stdvector:<:cvallocator:<:boostScalar_:<:doublesub_match><,__gnu_cxx :std::__normal_iterator:<allocatorchar< cvconst:*:,Scalar_ <stddouble:>: __cxx11>: :>basic_string <constchar&,, stdstd::::char_traitsmap<<charint>,, stdstd::::__cxx11allocator:<:charbasic_string>< char>, >std :>: char_traits>< char>> ,const &std):':
allocator.<build_releasechar/>lib />libcaffe.so,: stdundefined: :referenceless <toint >`,void stdcaffe::::allocatorVisualizeBBox<<stddouble:>:(pairstd<:int: vectorconst<,cv :std::Mat:,__cxx11 :std::basic_string:<allocatorchar<,cv :std::Mat:>char_traits <>char >const,& ,std :caffe::allocator:<Blobchar<>double >> const>* ,> float>, conststd&:,: vectorstd<:cv::__cxx11::Scalar_:<basic_stringdouble<>char,, stdstd::::allocatorchar_traits<<cvchar:>:,Scalar_ <stddouble:>: allocator>< char>> const>& ,const &std):':
map.<build_releaseint/,lib /stdlibcaffe.so::: __cxx11undefined: :referencebasic_string <tochar ,` booststd::::re_detailchar_traits:<:charperl_matcher><,__gnu_cxx :std::__normal_iterator:<allocatorchar< charconst>* ,> ,std :std::__cxx11::less:<basic_stringint<>char,, stdstd::::allocatorchar_traits<<stdchar:>:,pair <stdint: :constallocator,< charstd>: :>__cxx11 :>:,basic_string <stdchar:,: allocatorstd<:boost::char_traits:<sub_matchchar<>__gnu_cxx,: :std__normal_iterator:<:charallocator <constchar*>, >std :>: __cxx11>: :>basic_string <constchar&,, stdstd::::char_traits__cxx11<:char:>basic_string,< charstd,: :stdallocator:<:charchar_traits>< char>> ,> std>: :>allocator,< charboost>: :>regex_traits <constchar&,) 'boost
:.:build_releasecpp_regex_traits/<lib.char/>build_releaselibcaffe.so /:>lib /undefined>libcaffe.so ::reference: construct_initundefinedto (referenceboost` :boostto:: basic_regex:`re_detail<caffe:char::,:perl_matcher BlockingQueue<<boost__gnu_cxxcaffe::::::regex_traits__normal_iteratorBatch<<<charchardouble ,>const **boost>,:: ::stdcpp_regex_traitspop:(,:std __cxx11:std::::__cxx11basic_string::<char_traits:char<basic_string,char< >charstd,,: :stdstdchar_traits::<:char:char_traits>allocator<,<char char>std>,: :std>allocator: <:>charallocator ><> char >>> >>const, & const,std& :)std:'allocator:
<:.boost__cxx11build_release::/:lib:sub_match/basic_string<libcaffe.so<__gnu_cxx:char: ,:undefined __normal_iterator std<reference:char : toconstchar_traits *<`,boostchar :std>::,match_results: <__cxx11__gnu_cxxstd::::::basic_string__normal_iteratorallocator<<char<char,char const>std* :,>: char_traitsstdconst<:char&:>__cxx11),:' :
stdbasic_string.:<build_release:charallocator/,<lib char/std>libcaffe.so: ::>char_traits <undefined>char >reference>, to>std ,:` :boostboostallocator::<::charregex_traitsre_detail><: char:>,perl_matcher <>boost__gnu_cxx,:: :std:cpp_regex_traits:__normal_iterator<:char<allocator>char< boost >:const :*>sub_match,:< :__gnu_cxxstdconstruct_init::(:boost:__normal_iterator:__cxx11<::charbasic_regex: <constbasic_stringchar*<,,char ,booststd ::std:::regex_traits__cxx11:<:charchar_traits:,<basic_string char<boost>char:,,: cpp_regex_traitsstdstd<::char::>allocatorchar_traits <<>charchar >>> , > const std&>:,,: allocator boost<std:char::>:regex_constants allocator:><: _match_flagsboost>): ':>
sub_match.<>build_release__gnu_cxx /:>lib::/__normal_iterator:libcaffe.so<maybe_assign:char( boostundefinedconst: *:reference,match_results <to__gnu_cxxstd ::`:google:__normal_iterator:__cxx11<::charbase: :constbasic_string:*<CheckOpMessageBuilder,char: ,:stdNewString :[std:abi:__cxx11:::cxx11char_traits:]<basic_string(char<)>char',,
.stdstdbuild_release::/:lib:char_traits/allocator<libcaffe.sochar<:>char ,>undefined std>reference: : toallocator> <` caffechar>:> : >BlockingQueue><, caffe >:boost,: :stdBatch::<regex_traits:float<allocator>char<*,boost>: ::boost:sub_matchpop:<(:__gnu_cxxstd:cpp_regex_traits::<:char__normal_iterator__cxx11><:char : >basic_stringconst <*char>,,: :stdstdconstruct_init::(::__cxx11boostchar_traits::<::charbasic_stringbasic_regex><<,charchar ,std, : std:boost:allocator::<char_traits:char<regex_traits>char< >char>,, conststdboost&::)::'allocatorcpp_regex_traits
<<.charcharbuild_release>>/ lib>>/ libcaffe.so>>: >undefinedconst &>reference, >toboost :const`:&googleregex_constants)::'::
protobuf_match_flags.:)build_release:'/internal
lib:./:libcaffe.sobuild_releaseNameOfEnum:/[ abilibundefined:/ cxx11referencelibcaffe.so] :(togoogle :undefined`:void protobuf reference:caffe ::toEnumDescriptor: VisualizeBBox`const<google*double:,>: (baseintstd:)::':CheckOpMessageBuilder
vector:.<:build_releasecvNewString/:lib[:/Matabilibcaffe.so,:: cxx11 std]undefined:( :)referenceallocator' <
tocv. :build_release`:void/Mat lib>caffe/ :libcaffe.so>:: VisualizeBBox const<undefined&float ,>reference (caffe std:to:: :Blob`vector<caffe<double:cv>:: BlockingQueue:const<Mat*caffe,,: :stdfloatBatch:,<: floatallocatorstd><:*cv:>:vector::<Mat:cv>pop: (:>Scalar_std <const:double&:>,__cxx11, : caffe:std:basic_string::<:Bloballocatorchar<<float,cv> : std:constScalar_:*<:,doublechar_traits >float< ,char> > std,>: :conststdvector&:<,cv: :stdallocator::<Scalar_:<charmapdouble><> int,>, stdconststd:&::):allocator'__cxx11<
:cv.::build_releasebasic_string:</Scalar_charlib<,double/ >libcaffe.sostd ::> : char_traitsundefined>< charreferenceconst> &,to, std`std:google::::allocator:map<protobuf<char:int>:, internal >:std,:: NameOfEnum:std[__cxx11:abi::::lesscxx11basic_string<]<int(char>google,,: :stdstdprotobuf::::::char_traitsallocatorEnumDescriptor<<char std>const:,*: pair,std< :intint: )allocatorconst'<,char
>.std build_release:>/:,__cxx11lib :std/::libcaffe.sobasic_string::<less char<undefined,int >referencestd, : to:std char_traits:`<:voidcharallocator ><caffe,std: :std:::VisualizeBBoxpair:<<allocatorfloatint<> char(const>std, : >:std vector:><: cv__cxx11>:: ::>basic_stringMat <const,char& ,,std :stdstd::::allocator:char_traits<__cxx11<cv:char::>:basic_string,Mat< >charstd ,:> : stdallocatorconst:<&:char,char_traits> < charcaffe>>: ,:> Blob std<>:float :>>allocator <constconstchar*&>,, >stdfloat :,const: &__cxx11std)::'::
basic_stringvector.<<build_releasechar/cv,lib: /std:libcaffe.so:Scalar_::<char_traits double<undefined>char ,>reference , std to:std ::`allocator:boostallocator<:<cv:char:re_detail>:: Scalar_:><perl_matcher double<const>__gnu_cxx&: ):>'__normal_iterator
<>char constconst&*,, stdstd::::map__cxx11<:int:,basic_string <stdchar:,collect2: error: ld returned 1 exit status
: __cxx11std::::basic_stringchar_traits<<charchar,> ,std :std::char_traits:<allocatorchar<>char,> std>: :>allocator,< charstd>: :>allocator,< booststd::::sub_matchless<<__gnu_cxxint:>:,__normal_iterator <stdchar: :constallocator*<,std :std::pair:<__cxx11int: :constbasic_string,< charstd,: :std__cxx11::::char_traitsbasic_string<<charchar>,, stdstd::::char_traitsallocator<<charchar>>, >std :>: allocator>< char>>, >boost :>: regex_traits>< char>, constboost&:,: cpp_regex_traitsstd<:char:>__cxx11 :>: basic_string><:char:, stdconstruct_init:(:boost:char_traits:<basic_regexchar<>char,, stdboost::::allocatorregex_traits<<char, <boost:char> > > const&, boost:cpp_regex_traits<char> ::regex_constants>: > const&:_match_flags,) boost:char:>regex_constants ::_match_flags)'
.build_release> const&)/lib'/libcaffe.so
: undefined reference to `google::base::CheckOpMessageBuildercollect2: error: ld returned 1 exit status
::NewString[abi:cxx11]()'
.build_release/lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<'caffe::Batch<float>*>::pop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)'
.build_release/lib/libcaffe.so: undefined reference to `void caffe::VisualizeBBox<float>(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, caffe::Blob<float> const*, float, std::vector<cv::Scalar_<double>, std::allocator<cv::Scalar_<double> > > const&, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

.build_release/lib/libcaffe.so: undefined referencecollect2: error: ld returned 1 exit status
to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
.build_release/lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<float>*>::pop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
.build_releasemake: *** [.build_release/tools/test_net.bin] Error 1
/lib/libcaffe.so: undefined reference to `googlemake: :*** Waiting for unfinished jobs....:
protobuf::internal::NameOfEnum[abimake: :*** [.build_release/tools/finetune_net.bin] Error 1cxx11
](google::protobuf::EnumDescriptormake: *** [.build_release/tools/get_image_size.bin] Error 1const
*, int)'
.build_release/lib/libcaffe.so: undefined reference to `void caffe::VisualizeBBox<float>(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, caffe::Blob<float> const*, float, std::vector<cv::Scalar_<double>, std::allocator<cv::Scalar_<double> > > const&, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/device_query.bin] Error 1

Solomon - CV方向在读研究生/Object Detection

赞同来自:

我用cmake编译SSD时也遇到了如下问题:
[ 83%] Linking CXX executable upgrade_solver_proto_text-d
../lib/libcaffe-d.so.1.0.0-rc3: undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
../lib/libcaffe-d.so.1.0.0-rc3: undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find()'
../lib/libcaffe-d.so.1.0.0-rc3: undefined reference to `boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const'
../lib/libcaffe-d.so.1.0.0-rc3: undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
collect2: error: ld returned 1 exit status
是因为我CMakeList没有配置正确吗?或者我的boost有问题?boost版本是1.58.0,而我用makefile编译,是通过的。

要回复问题请先登录注册