.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::cpp_regex_traits_implementation
.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.so: undefined reference toboost::re_detail::put_mem_block(void)'
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::get_mem_block()'
.build_release/lib/libcaffe.so: undefined reference toboost::basic_regex
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference toboost::cpp_regex_traits
.build_release/lib/libcaffe.so: 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)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
collect2: error: ld returned 1 exit status
Makefile:627: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::cpp_regex_traits_implementation
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
.build_release/lib/libcaffe.so: undefined reference toboost::match_results<__gnu_cxx::__normal_iterator
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::put_mem_block(void*)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::get_mem_block()'
.build_release/lib/libcaffe.so: undefined reference to boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference to boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
collect2: error: ld returned 1 exit status
Makefile:627: recipe for target '.build_release/tools/caffe.bin' failed
make:
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::cpp_regex_traits_implementation
.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.so: undefined reference toboost::re_detail::put_mem_block(void)'
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::get_mem_block()'
.build_release/lib/libcaffe.so: undefined reference toboost::basic_regex
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference toboost::cpp_regex_traits
.build_release/lib/libcaffe.so: 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)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
collect2: error: ld returned 1 exit status
Makefile:627: recipe for target '.build_release/tools/convert_annoset.bin' failed
make: *** [.build_release/tools/convert_annoset.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::cpp_regex_traits_implementation
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
.build_release/lib/libcaffe.so: undefined reference toboost::match_results<__gnu_cxx::__normal_iterator
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::put_mem_block(void*)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::get_mem_block()'
.build_release/lib/libcaffe.so: undefined reference to boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference to boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
collect2: error: ld returned 1 exit status
Makefile:627: recipe for target '.build_release/tools/extract_features.bin' failed
make: * [.build_release/tools/extract_features.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::cpp_regex_traits_implementation
.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.so: undefined reference toboost::re_detail::put_mem_block(void)'
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::get_mem_block()'
.build_release/lib/libcaffe.so: undefined reference toboost::basic_regex
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference toboost::cpp_regex_traits
.build_release/lib/libcaffe.so: 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)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
collect2: error: ld returned 1 exit status
Makefile:627: recipe for target '.build_release/tools/upgrade_solver_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_solver_proto_text.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::cpp_regex_traits_implementation
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
.build_release/lib/libcaffe.so: undefined reference toboost::match_results<__gnu_cxx::__normal_iterator
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::put_mem_block(void*)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::get_mem_block()'
.build_release/lib/libcaffe.so: undefined reference to boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference to boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
collect2: error: ld returned 1 exit status
Makefile:627: recipe for target '.build_release/tools/compute_image_mean.bin' failed
make: * [.build_release/tools/compute_image_mean.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::cpp_regex_traits_implementation
.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.so: undefined reference toboost::re_detail::put_mem_block(void)'
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::get_mem_block()'
.build_release/lib/libcaffe.so: undefined reference toboost::basic_regex
.build_release/lib/libcaffe.so: undefined reference to boost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference toboost::cpp_regex_traits
.build_release/lib/libcaffe.so: 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)'
.build_release/lib/libcaffe.so: undefined reference toboost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
collect2: error: ld returned 1 exit status
Makefile:627: recipe for target '.build_release/tools/create_label_map.bin' failed
make: *
If you are having difficulty building Caffe or training a model, please ask the caffe-users mailing list. If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.
Operating system: Ubuntu 16.04
Compiler:
CUDA version (if applicable):cuda8.0
CUDNN version (if applicable):cudnn5.1
BLAS:
Python or MATLAB version (for pycaffe and matcaffe respectively):ptython2.7
I have a caffe environment has compiled completely and can work. who can help me solve this problem .THANK YOU VERY MUCH
Maybe your boost version is too low, a 1.6x is needed to successfully build it. @YYaiLearner
Closing as not directly related to original Caffe. Consider posting this issue in its own fork.
Did you solve it? I met the same problem and don't know what to do.
try this
fixed your Makefile
https://github.com/rbgirshick/fast-rcnn/issues/52
yes ,i just sovle this the problem by your problem, and it worked.@xwater8
This is likely due to the problem that when the system use gcc-5.x.x, it requires -std=c++11, but the boost lib in Debian system are built without such an option. So you need to build your own version of boost. My solution is:
1) Find the version of the current boost lib. In my scenario, I install boost in miniconda2, the version is boost-1.67.0.
2) Download the boost lib source file with exactly the same version from https://www.boost.org/.
3) Compile boost with std=c++11 using: $b2 toolset=gcc cxxflags=”-std=c++11”
4) Copy the generated library to replace the original boost library: $cp boost-1.67.0/stage/lib/* ~/miniconda2/lib/
5) Compile caffe and done.
This is likely due to the problem that when the system use gcc-5.x.x, it requires -std=c++11, but the boost lib in Debian system are built without such an option. So you need to build your own version of boost. My solution is:
- Find the version of the current boost lib. In my scenario, I install boost in miniconda2, the version is boost-1.67.0.
- Download the boost lib source file with exactly the same version from https://www.boost.org/.
- Compile boost with std=c++11 using: $b2 toolset=gcc cxxflags=”-std=c++11”
- Copy the generated library to replace the original boost library: $cp boost-1.67.0/stage/lib/* ~/miniconda2/lib/
- Compile caffe and done.
It works! Thanks!!
Most helpful comment
This is likely due to the problem that when the system use gcc-5.x.x, it requires -std=c++11, but the boost lib in Debian system are built without such an option. So you need to build your own version of boost. My solution is:
1) Find the version of the current boost lib. In my scenario, I install boost in miniconda2, the version is boost-1.67.0.
2) Download the boost lib source file with exactly the same version from https://www.boost.org/.
3) Compile boost with std=c++11 using: $b2 toolset=gcc cxxflags=”-std=c++11”
4) Copy the generated library to replace the original boost library: $cp boost-1.67.0/stage/lib/* ~/miniconda2/lib/
5) Compile caffe and done.