Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Error when building #2

Open
steelstring94 opened this issue May 9, 2017 · 1 comment
Open

Error when building #2

steelstring94 opened this issue May 9, 2017 · 1 comment

Comments

@steelstring94
Copy link

After completing cmake when running make, I get errors about undefined references. This is the output:
[ 35%] Built target Project-core [ 41%] Linking CXX executable /home/ben/e4rat-lite/Project-collect CMakeFiles/Project-collect.dir/fileptr.cc.o: In function _GLOBAL__sub_I__Z12isFileUniquePKc':
fileptr.cc:(.text.startup+0x15): undefined reference to boost::system::generic_category()' fileptr.cc:(.text.startup+0x1a): undefined reference to boost::system::generic_category()'
fileptr.cc:(.text.startup+0x33): undefined reference to boost::system::system_category()' CMakeFiles/Project-collect.dir/listener.cc.o: In function doesRegexMatchPath(boost::filesystem::path&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits > >&)':
listener.cc:(.text+0x3975): undefined reference to boost::re_detail_106200::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)' CMakeFiles/Project-collect.dir/listener.cc.o: In function boost::re_detail_106200::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >, boost::regex_traits<char, boost::cpp_regex_traits > >::unwind_extra_block(bool)':
listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE18unwind_extra_blockEb[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE18unwind_extra_blockEb]+0x3c): undefined reference to boost::re_detail_106200::put_mem_block(void*)' CMakeFiles/Project-collect.dir/listener.cc.o: In function boost::re_detail_106200::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >, boost::regex_traits<char, boost::cpp_regex_traits > >::find_imp()':
listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv]+0x1a): undefined reference to boost::re_detail_106200::get_mem_block()' listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv]+0x15d): undefined reference to boost::re_detail_106200::verify_options(unsigned int, boost::regex_constants::_match_flags)'
listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv]+0x19f): undefined reference to boost::re_detail_106200::put_mem_block(void*)' listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv]+0x342): undefined reference to boost::re_detail_106200::put_mem_block(void*)'
CMakeFiles/Project-collect.dir/listener.cc.o: In function __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > boost::re_detail_106200::re_is_set_member<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::re_detail_106200::re_set_long<unsigned int> const*, boost::re_detail_106200::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)': listener.cc:(.text._ZN5boost16re_detail_10620016re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10620016re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x1b6): undefined reference to boost::re_detail_106200::cpp_regex_traits_implementation::transform_primary[abi:cxx11](char const*, char const*) const'
listener.cc:(.text._ZN5boost16re_detail_10620016re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10620016re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x498): undefined reference to boost::re_detail_106200::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const' CMakeFiles/Project-collect.dir/listener.cc.o: In function _GLOBAL__sub_I__Z14getProcessNameB5cxx11i':
listener.cc:(.text.startup+0x15): undefined reference to boost::system::generic_category()' listener.cc:(.text.startup+0x1a): undefined reference to boost::system::generic_category()'
listener.cc:(.text.startup+0x33): undefined reference to boost::system::system_category()' CMakeFiles/Project-collect.dir/listener.cc.o: In function void boost::re_detail_106200::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits > > const&, boost::regex_constants::error_type)':
listener.cc:(.text._ZN5boost16re_detail_10620011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[_ZN5boost16re_detail_10620011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE]+0xb5): undefined reference to boost::re_detail_106200::raise_runtime_error(std::runtime_error const&)' listener.cc:(.text._ZN5boost16re_detail_10620011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[_ZN5boost16re_detail_10620011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE]+0xe8): undefined reference to boost::re_detail_106200::get_default_error_string(boost::regex_constants::error_type)'
CMakeFiles/Project-collect.dir/listener.cc.o: In function boost::re_detail_106200::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> > >::extend_stack()': listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12extend_stackEv[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12extend_stackEv]+0x2c): undefined reference to boost::re_detail_106200::get_mem_block()'
CMakeFiles/Project-collect.dir/listener.cc.o: In function boost::re_detail_106200::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> > >::match_match()': listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE11match_matchEv[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE11match_matchEv]+0x234): undefined reference to boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > > const&)'
CMakeFiles/Project-collect.dir/listener.cc.o: In function boost::re_detail_106200::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> > >::match_prefix()': listener.cc:(.text._ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12match_prefixEv[_ZN5boost16re_detail_10620012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12match_prefixEv]+0x12c): undefined reference to boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > > const&)'
CMakeFiles/Project-collect.dir/e4rat-collect.cc.o: In function main': e4rat-collect.cc:(.text.startup+0x99a): undefined reference to boost::filesystem::path::filename() const'
CMakeFiles/Project-collect.dir/e4rat-collect.cc.o: In function _GLOBAL__sub_I__Z4peekP8_IO_FILE': e4rat-collect.cc:(.text.startup+0x14a5): undefined reference to boost::system::generic_category()'
e4rat-collect.cc:(.text.startup+0x14aa): undefined reference to boost::system::generic_category()' e4rat-collect.cc:(.text.startup+0x14af): undefined reference to boost::system::system_category()'
CMakeFiles/Project-collect.dir/eventcatcher.cc.o: In function ScanFsAccess::readLink(boost::filesystem::path&)': eventcatcher.cc:(.text+0x3ab): undefined reference to boost::filesystem::path::parent_path() const'
CMakeFiles/Project-collect.dir/eventcatcher.cc.o: In function _GLOBAL__sub_I__ZN12ScanFsAccess6insertER7FilePtr': eventcatcher.cc:(.text.startup+0x15): undefined reference to boost::system::generic_category()'
eventcatcher.cc:(.text.startup+0x1a): undefined reference to boost::system::generic_category()' eventcatcher.cc:(.text.startup+0x33): undefined reference to boost::system::system_category()'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::absolute(boost::filesystem::path const&, boost::filesystem::path const&)' /home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::detail::dir_itr_close(void*&, void*&)'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::path::m_path_iterator_increment(boost::filesystem::path::iterator&)' /home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::detail::initial_path(boost::system::error_code*)'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::path::begin() const' /home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::detail::system_complete(boost::filesystem::path const&, boost::system::error_code*)'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::path::root_directory() const' /home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::path::compare(boost::filesystem::path const&) const' /home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const' /home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)' /home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::path::operator/=(boost::filesystem::path const&)'
/home/ben/e4rat-lite/libProject-core.so.0: undefined reference to boost::filesystem::path::end() const' collect2: error: ld returned 1 exit status CMakeFiles/Project-collect.dir/build.make:176: recipe for target '/home/ben/e4rat-lite/Project-collect' failed make[2]: *** [/home/ben/e4rat-lite/Project-collect] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Project-collect.dir/all' failed make[1]: *** [CMakeFiles/Project-collect.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

@Otamay
Copy link

Otamay commented Jun 21, 2018

I had the same problem, was compiling against gcc/g++ 4.9). Changed to gcc/g++ 6.3 and it compiled perfectly,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants