frcnn
frcnn copied to clipboard
undefined reference to `Blowfish::Blowfish`
Hi, I compile follow the steps:
- cd $CAFFE_ROOT
- cp Makefile.config.example Makefile.config
- uncomment the line: USE_CUDNN := 1
- comment the *_20 and *_21 lines
- make -j7
and I get errors like that:
.build_release/tools/encrypt_model.o: In function main': encrypt_model.cpp:(.text.startup+0x79): undefined reference to
Blowfish::Blowfish(std::vector<char, std::allocatorBlowfish::Decrypt(char const*, char const*)' encrypt_model.cpp:(.text.startup+0x113): undefined reference to
Blowfish::Encrypt(char const*, char const*)'
collect2: error: ld returned 1 exit status
Makefile:711: recipe for target '.build_release/tools/encrypt_model.bin' failed
make: *** [.build_release/tools/encrypt_model.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_release/tools/convert_imageset.o: In function main': convert_imageset.cpp:(.text.startup+0xf2a): undefined reference to
caffe::ReadImageToDatum(std::__cxx11::basic_string<char, std::char_traits<mainchar'>:, convert_annoset.cppstd::(:.allocatortext.startup<+char0x9f9>) :> undefinedconst &reference, tocaffe :
:caffeDatum::)LabelMap':
:~LabelMap()'
convert_annoset.cpp:(.text.startup+0xc00): undefined reference to caffe::AnnotatedDatum::AnnotatedDatum()' convert_annoset.cppcollect2: error: ld returned 1 exit status :(.text.startup+0xd6f): undefined reference to
caffe::AnnotatedDatum::~AnnotatedDatum()'
convert_annoset.cpp:(.text.startup+0xebd): undefined reference to caffe::LabelMap::LabelMap()' convert_annoset.cpp:(.text.startup+0xeea): undefined reference to
caffe::MapNameToLabel(caffe::LabelMap const&, bool, std::map<std::__cxx11::basic_string<char, std::char_traitscaffe::ReadImageToDatum(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int, int, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&Makefile:711: recipe for target '.build_release/tools/convert_imageset.bin' failed , caffemake: *** [.build_release/tools/convert_imageset.bin] Error 1 ::Datum*)' convert_annoset.cpp:(.text.startup+0x1ec5): undefined reference to
caffe::ReadRichImageToAnnotatedDatum(std::__cxx11::basic_string<char, std::char_traitscaffe::AnnotatedDatum::~AnnotatedDatum()' convert_annoset.cpp:(.text.startup+0x2436): undefined reference to
caffe::LabelMap::~LabelMap()'
collect2: error: ld returned 1 exit status
Makefile:711: recipe for target '.build_release/tools/convert_annoset.bin' failed
make: *** [.build_release/tools/convert_annoset.bin] Error 1
.build_release/tools/extract_features.o: In function int feature_extraction_pipeline<float>(int, char**)': extract_features.cpp:(.text._Z27feature_extraction_pipelineIfEiiPPc[_Z27feature_extraction_pipelineIfEiiPPc]+0x1d3): undefined reference to
caffe::Netmain': convert_annoset_r.cpp:(.text.startup+0x9f9): undefined reference to
caffe::LabelMap::~LabelMap()'
convert_annoset_r.cpp:(.text.startup+0xc00): undefined reference to caffe::AnnotatedDatumR::AnnotatedDatumR()' convert_annoset_r.cpp:(.text.startup+0xd6f): undefined reference to
caffe::AnnotatedDatumR::~AnnotatedDatumR()'
convert_annoset_r.cpp:(.text.startup+0xeba): undefined reference to caffe::LabelMap::LabelMap()' convert_annoset_r.cpp:(.text.startup+0x159f): undefined reference to
caffe::ReadImageToDatum(std::__cxx11::basic_string<char, std::char_traitscaffe::ReadRichImageToAnnotatedDatumR(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&, int, int, int, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, caffe::AnnotatedDatumR_AnnotationType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > > const&, caffe::AnnotatedDatumR*)' convert_annoset_r.cpp:(.text.startup+0x2634): undefined reference to
caffe::AnnotatedDatumR::~AnnotatedDatumR()'
convert_annoset_r.cpp:(.text.startup+0x26e2): undefined reference to caffe::LabelMap::~LabelMap()' collect2: error: ld returned 1 exit status .build_release/tools/caffe.o: In function
CopyLayers(caffe::Solvercaffe::Net<float>::CopyTrainedLayersFrom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' caffe.cpp:(.text+0x727): undefined reference to
caffe::Nettest()': caffe.cpp:(.text+0x16e9): undefined reference to
caffe::Net
Why and how to fix it?
@zjbaby I can't directly think of what the problem is, it may be related to your compilation environment.Make a clean copy and try again later.