I have been following the build instructions in the README, but am getting this error. I am not very familiar with compiling so I'm not sure how to debug. I installed cmake, etc via linuxbrew, so I don't know if that's causing the issue:
[ 27%] Linking CXX executable generate_common
/tmp/cczBjDuU.ltrans0.ltrans.o: In function `td::TD_TL_writer_hpp::~TD_TL_writer_hpp()':
<artificial>:(.text._ZN2td16TD_TL_writer_hppD0Ev+0x3d): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans0.ltrans.o: In function `td::TD_TL_writer_h::~TD_TL_writer_h()':
<artificial>:(.text._ZN2td14TD_TL_writer_hD0Ev+0x8d): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans0.ltrans.o: In function `td::TD_TL_writer_cpp::~TD_TL_writer_cpp()':
<artificial>:(.text._ZN2td16TD_TL_writer_cppD0Ev+0x8d): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans0.ltrans.o: In function `td::TD_TL_writer::~TD_TL_writer() [clone .lto_priv.22]':
<artificial>:(.text._ZN2td12TD_TL_writerD2Ev.lto_priv.22+0x41): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans0.ltrans.o: In function `td::TD_TL_writer_hpp::~TD_TL_writer_hpp() [clone .lto_priv.25]':
<artificial>:(.text._ZN2td16TD_TL_writer_hppD2Ev.lto_priv.25+0x41): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans0.ltrans.o:<artificial>:(.text._ZN2td14TD_TL_writer_hD2Ev.lto_priv.24+0x97): more undefined references to `vtable for td::tl::TL_writer' follow
/tmp/cczBjDuU.ltrans3.ltrans.o: In function `td::TD_TL_writer_jni_cpp::gen_basic_java_class_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const':
<artificial>:(.text._ZNK2td20TD_TL_writer_jni_cpp25gen_basic_java_class_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x52): undefined reference to `td::tl::TL_writer::to_upper(char)'
<artificial>:(.text._ZNK2td20TD_TL_writer_jni_cpp25gen_basic_java_class_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xc7): undefined reference to `td::tl::TL_writer::is_alnum(char)'
/tmp/cczBjDuU.ltrans3.ltrans.o: In function `td::TD_TL_writer_jni_cpp::gen_java_field_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const':
<artificial>:(.text._ZNK2td20TD_TL_writer_jni_cpp19gen_java_field_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x52): undefined reference to `td::tl::TL_writer::to_upper(char)'
<artificial>:(.text._ZNK2td20TD_TL_writer_jni_cpp19gen_java_field_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xc7): undefined reference to `td::tl::TL_writer::is_alnum(char)'
/tmp/cczBjDuU.ltrans4.ltrans.o: In function `td::TD_TL_writer::gen_var_name[abi:cxx11](td::tl::var_description const&) const':
<artificial>:(.text._ZNK2td12TD_TL_writer12gen_var_nameB5cxx11ERKNS_2tl15var_descriptionE+0x18): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
/tmp/cczBjDuU.ltrans4.ltrans.o: In function `td::TD_TL_writer::is_combinator_supported(td::tl::tl_combinator const*) const':
<artificial>:(.text._ZNK2td12TD_TL_writer23is_combinator_supportedEPKNS_2tl13tl_combinatorE+0x15): undefined reference to `td::tl::TL_writer::is_combinator_supported(td::tl::tl_combinator const*) const'
/tmp/cczBjDuU.ltrans4.ltrans.o: In function `td::TD_TL_writer::gen_class_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const':
<artificial>:(.text._ZNK2td12TD_TL_writer14gen_class_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x59): undefined reference to `td::tl::TL_writer::is_alnum(char)'
/tmp/cczBjDuU.ltrans4.ltrans.o: In function `td::TD_TL_writer::gen_field_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const':
<artificial>:(.text._ZNK2td12TD_TL_writer14gen_field_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x29): undefined reference to `td::tl::TL_writer::is_alnum(char)'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td20TD_TL_writer_jni_cppE+0x38): undefined reference to `td::tl::TL_writer::is_type_supported(td::tl::tl_tree_type const*) const'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td20TD_TL_writer_jni_cppE+0x50): undefined reference to `td::tl::TL_writer::is_documentation_generated() const'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td20TD_TL_writer_jni_cppE+0xd0): undefined reference to `td::tl::TL_writer::gen_main_class_name[abi:cxx11](td::tl::tl_type const*) const'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td20TD_TL_writer_jni_cppE+0xd8): undefined reference to `td::tl::TL_writer::gen_field_type[abi:cxx11](td::tl::arg const&) const'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td18TD_TL_writer_jni_hE+0x38): undefined reference to `td::tl::TL_writer::is_type_supported(td::tl::tl_tree_type const*) const'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td18TD_TL_writer_jni_hE+0x50): undefined reference to `td::tl::TL_writer::is_documentation_generated() const'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td18TD_TL_writer_jni_hE+0xd0): undefined reference to `td::tl::TL_writer::gen_main_class_name[abi:cxx11](td::tl::tl_type const*) const'
/tmp/cczBjDuU.ltrans4.ltrans.o:(.data.rel.ro._ZTVN2td18TD_TL_writer_jni_hE+0xd8): undefined reference to `td::tl::TL_writer::gen_field_type[abi:cxx11](td::tl::arg const&) const'
/tmp/cczBjDuU.ltrans5.ltrans.o: In function `td::TD_TL_writer_h::gen_flags_definitions[abi:cxx11](td::tl::tl_combinator const*) const':
<artificial>:(.text._ZNK2td14TD_TL_writer_h21gen_flags_definitionsB5cxx11EPKNS_2tl13tl_combinatorE+0x109): undefined reference to `td::tl::TL_writer::to_upper(char)'
<artificial>:(.text._ZNK2td14TD_TL_writer_h21gen_flags_definitionsB5cxx11EPKNS_2tl13tl_combinatorE+0x384): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
/tmp/cczBjDuU.ltrans6.ltrans.o: In function `td::TD_TL_writer_cpp::gen_full_fetch_class_name[abi:cxx11](td::tl::tl_tree_type const*) const':
<artificial>:(.text._ZNK2td16TD_TL_writer_cpp25gen_full_fetch_class_nameB5cxx11EPKNS_2tl12tl_tree_typeE+0x173): undefined reference to `td::tl::TL_writer::is_combinator_supported(td::tl::tl_combinator const*) const'
<artificial>:(.text._ZNK2td16TD_TL_writer_cpp25gen_full_fetch_class_nameB5cxx11EPKNS_2tl12tl_tree_typeE+0x22b): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
/tmp/cczBjDuU.ltrans6.ltrans.o: In function `td::TD_TL_writer_cpp::gen_constructor_id_store[abi:cxx11](int, int) const':
<artificial>:(.text._ZNK2td16TD_TL_writer_cpp24gen_constructor_id_storeB5cxx11Eii+0x29): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
/tmp/cczBjDuU.ltrans6.ltrans.o: In function `td::TD_TL_writer_cpp::gen_field_fetch[abi:cxx11](int, td::tl::arg const&, std::vector<td::tl::var_description, std::allocator<td::tl::var_description> >&, bool, int) const':
<artificial>:(.text._ZNK2td16TD_TL_writer_cpp15gen_field_fetchB5cxx11EiRKNS_2tl3argERSt6vectorINS1_15var_descriptionESaIS6_EEbi+0x134): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::~TD_TL_writer_jni_h()':
<artificial>:(.text._ZN2td18TD_TL_writer_jni_hD0Ev+0x8d): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::gen_additional_proxy_function_end(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, bool) const':
<artificial>:(.text._ZNK2td18TD_TL_writer_jni_h33gen_additional_proxy_function_endERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_2tl7tl_typeEb+0x44): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_end(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, bool) const'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, td::tl::tl_combinator const*, int, bool) const':
<artificial>:(.text._ZNK2td18TD_TL_writer_jni_h34gen_additional_proxy_function_caseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_2tl7tl_typeEPKNS9_13tl_combinatorEib+0x5b): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, td::tl::tl_combinator const*, int, bool) const'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) const':
<artificial>:(.text._ZNK2td18TD_TL_writer_jni_h34gen_additional_proxy_function_caseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_2tl7tl_typeES8_i+0x4b): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) const'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::gen_additional_proxy_function_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool) const':
<artificial>:(.text._ZNK2td18TD_TL_writer_jni_h35gen_additional_proxy_function_beginERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_2tl7tl_typeES8_ib+0xa7): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool) const'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::gen_additional_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_combinator const*, bool) const':
<artificial>:(.text._ZNK2td18TD_TL_writer_jni_h23gen_additional_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_2tl13tl_combinatorEb+0x91): undefined reference to `td::tl::TL_writer::gen_additional_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_combinator const*, bool) const'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::get_additional_functions[abi:cxx11]() const':
<artificial>:(.text._ZNK2td18TD_TL_writer_jni_h24get_additional_functionsB5cxx11Ev+0x1a): undefined reference to `td::tl::TL_writer::get_additional_functions[abi:cxx11]() const'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::get_additional_function_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
<artificial>:(.text._ZNK2td18TD_TL_writer_jni_h28get_additional_function_typeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x3b): undefined reference to `td::tl::TL_writer::get_additional_function_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans7.ltrans.o: In function `td::TD_TL_writer_jni_h::~TD_TL_writer_jni_h() [clone .lto_priv.34]':
<artificial>:(.text._ZN2td18TD_TL_writer_jni_hD2Ev.lto_priv.34+0x97): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans9.ltrans.o: In function `td::TD_TL_writer_cpp::gen_full_store_class_name[abi:cxx11](td::tl::tl_tree_type const*) const':
<artificial>:(.text._ZNK2td16TD_TL_writer_cpp25gen_full_store_class_nameB5cxx11EPKNS_2tl12tl_tree_typeE+0xd7): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
<artificial>:(.text._ZNK2td16TD_TL_writer_cpp25gen_full_store_class_nameB5cxx11EPKNS_2tl12tl_tree_typeE+0x25d): undefined reference to `td::tl::TL_writer::is_combinator_supported(td::tl::tl_combinator const*) const'
/tmp/cczBjDuU.ltrans11.ltrans.o: In function `td::TD_TL_writer_cpp::gen_field_store[abi:cxx11](td::tl::arg const&, std::vector<td::tl::var_description, std::allocator<td::tl::var_description> >&, bool, int) const':
<artificial>:(.text._ZNK2td16TD_TL_writer_cpp15gen_field_storeB5cxx11ERKNS_2tl3argERSt6vectorINS1_15var_descriptionESaIS6_EEbi+0xfb): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
/tmp/cczBjDuU.ltrans12.ltrans.o: In function `td::TD_TL_writer_h::gen_get_id(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool) const':
<artificial>:(.text._ZNK2td14TD_TL_writer_h10gen_get_idERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEib+0x8e): undefined reference to `td::tl::TL_writer::int_to_string[abi:cxx11](int)'
/tmp/cczBjDuU.ltrans14.ltrans.o: In function `td::TD_TL_writer_jni_cpp::~TD_TL_writer_jni_cpp()':
<artificial>:(.text._ZN2td20TD_TL_writer_jni_cppD0Ev+0xb2): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans14.ltrans.o: In function `td::TD_TL_writer_jni_cpp::~TD_TL_writer_jni_cpp() [clone .lto_priv.35]':
<artificial>:(.text._ZN2td20TD_TL_writer_jni_cppD2Ev.lto_priv.35+0xb7): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans15.ltrans.o: In function `td::TD_TL_writer::TD_TL_writer(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .constprop.14]':
<artificial>:(.text._ZN2td12TD_TL_writerC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_.constprop.14+0x4): undefined reference to `vtable for td::tl::TL_writer'
/tmp/cczBjDuU.ltrans15.ltrans.o: In function `void generate_cpp<td::TD_TL_writer_cpp, td::TD_TL_writer_h, td::TD_TL_writer_hpp>(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&, 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&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) [clone .constprop.13]':
<artificial>:(.text._Z12generate_cppIN2td16TD_TL_writer_cppENS0_14TD_TL_writer_hENS0_16TD_TL_writer_hppEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_SB_SB_RKSt6vectorIS9_SaIS9_EESG_.constprop.13+0xc8): undefined reference to `td::tl::read_tl_config_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
<artificial>:(.text._Z12generate_cppIN2td16TD_TL_writer_cppENS0_14TD_TL_writer_hENS0_16TD_TL_writer_hppEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_SB_SB_RKSt6vectorIS9_SaIS9_EESG_.constprop.13+0x16f): undefined reference to `td::tl::write_tl_to_file(td::tl::tl_config const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::TL_writer const&)'
<artificial>:(.text._Z12generate_cppIN2td16TD_TL_writer_cppENS0_14TD_TL_writer_hENS0_16TD_TL_writer_hppEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_SB_SB_RKSt6vectorIS9_SaIS9_EESG_.constprop.13+0x232): undefined reference to `td::tl::write_tl_to_file(td::tl::tl_config const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::TL_writer const&)'
<artificial>:(.text._Z12generate_cppIN2td16TD_TL_writer_cppENS0_14TD_TL_writer_hENS0_16TD_TL_writer_hppEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_SB_SB_RKSt6vectorIS9_SaIS9_EESG_.constprop.13+0x2ce): undefined reference to `td::tl::write_tl_to_file(td::tl::tl_config const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::TL_writer const&)'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_hppE+0x38): undefined reference to `td::tl::TL_writer::is_type_supported(td::tl::tl_tree_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_hppE+0x58): undefined reference to `td::tl::TL_writer::get_parser_type(td::tl::tl_combinator const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_hppE+0xd0): undefined reference to `td::tl::TL_writer::gen_main_class_name[abi:cxx11](td::tl::tl_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_hppE+0xd8): undefined reference to `td::tl::TL_writer::gen_field_type[abi:cxx11](td::tl::arg const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x38): undefined reference to `td::tl::TL_writer::is_type_supported(td::tl::tl_tree_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x50): undefined reference to `td::tl::TL_writer::is_documentation_generated() const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x58): undefined reference to `td::tl::TL_writer::get_parser_type(td::tl::tl_combinator const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x68): undefined reference to `td::tl::TL_writer::get_additional_function_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x90): undefined reference to `td::tl::TL_writer::get_additional_functions[abi:cxx11]() const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0xd0): undefined reference to `td::tl::TL_writer::gen_main_class_name[abi:cxx11](td::tl::tl_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0xd8): undefined reference to `td::tl::TL_writer::gen_field_type[abi:cxx11](td::tl::arg const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x210): undefined reference to `td::tl::TL_writer::gen_additional_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_combinator const*, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x218): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x220): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x228): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, td::tl::tl_combinator const*, int, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td14TD_TL_writer_hE+0x230): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_end(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x38): undefined reference to `td::tl::TL_writer::is_type_supported(td::tl::tl_tree_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x50): undefined reference to `td::tl::TL_writer::is_documentation_generated() const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x58): undefined reference to `td::tl::TL_writer::get_parser_type(td::tl::tl_combinator const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x68): undefined reference to `td::tl::TL_writer::get_additional_function_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x90): undefined reference to `td::tl::TL_writer::get_additional_functions[abi:cxx11]() const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0xd0): undefined reference to `td::tl::TL_writer::gen_main_class_name[abi:cxx11](td::tl::tl_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0xd8): undefined reference to `td::tl::TL_writer::gen_field_type[abi:cxx11](td::tl::arg const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x210): undefined reference to `td::tl::TL_writer::gen_additional_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_combinator const*, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x218): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x220): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x228): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, td::tl::tl_combinator const*, int, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td16TD_TL_writer_cppE+0x230): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_end(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x38): undefined reference to `td::tl::TL_writer::is_type_supported(td::tl::tl_tree_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x50): undefined reference to `td::tl::TL_writer::is_documentation_generated() const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x58): undefined reference to `td::tl::TL_writer::get_parser_type(td::tl::tl_combinator const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x68): undefined reference to `td::tl::TL_writer::get_additional_function_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x90): undefined reference to `td::tl::TL_writer::get_additional_functions[abi:cxx11]() const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0xd0): undefined reference to `td::tl::TL_writer::gen_main_class_name[abi:cxx11](td::tl::tl_type const*) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0xd8): undefined reference to `td::tl::TL_writer::gen_field_type[abi:cxx11](td::tl::arg const&) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x210): undefined reference to `td::tl::TL_writer::gen_additional_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_combinator const*, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x218): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x220): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x228): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, td::tl::tl_combinator const*, int, bool) const'
/tmp/cczBjDuU.ltrans15.ltrans.o:(.data.rel.ro._ZTVN2td12TD_TL_writerE+0x230): undefined reference to `td::tl::TL_writer::gen_additional_proxy_function_end(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::tl::tl_type const*, bool) const'
collect2: error: ld returned 1 exit status
td/generate/CMakeFiles/generate_common.dir/build.make:251: recipe for target 'td/generate/generate_common' failed
make[2]: *** [td/generate/generate_common] Error 1
CMakeFiles/Makefile2:878: recipe for target 'td/generate/CMakeFiles/generate_common.dir/all' failed
make[1]: *** [td/generate/CMakeFiles/generate_common.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Which c++ compiler do you use? And which Linux?
@arseny30 I used cmake and am on Kubuntu 16.04.
These are all the commands I ran to get to that point:
brew install cmake
brew install gperf
brew install zlib
git clone https://github.com/tdlib/td.git
cd td
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
cmake version is 3.10.2
Could you try to disable LTO by commenting line 26 of CMakeLists.txt:
# set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CXX_FLAGS_IPO}")
@levlam that fixed it, thanks!
I'm now having another problem though trying to use it in Python:
>>> tdjson = ctypes.CDLL('/home/skeledrew/Projects/Telegram/td/build/libtdjson.so')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/skeledrew/.pyenv/versions/3.6.1/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/skeledrew/.linuxbrew/Cellar/openssl/1.0.2n_1/lib/libssl.so.1.0.0: undefined symbol: EVP_idea_cbc
/home/skeledrew/.linuxbrew/Cellar/openssl/1.0.2n_1/lib/libssl.so.1.0.0: undefined symbol: EVP_idea_cbc
Also tg_cli runs but isn't really helpful as to how to provide the id and hash:
[ 1][t 0][1518030714.069893360][cli.cpp:3002] You should provide some valid api_id and api_hash
It looks like libcrypto.so can't be found in runtime when python example is run.
tg_cli is our test console client. You can look here for some examples of TDLib usage in C++, but shouldn't really need it. api_id and api_hash are Application identifier/hash which are needed to access Telegram API and should be obtained at https://my.telegram.org.
Seems I need to recompile Python. I tried it in default Python2 and it works. Now I just need to figure how to recompile with libcrypto or openssl headers?
>>> tdjson = ctypes.CDLL('/home/skeledrew/Projects/Telegram/td/build/libtdjson.so')
>>> tdjson.__dict__
{'_FuncPtr': <class 'ctypes._FuncPtr'>, '_handle': 30084432, '_name': '/home/skeledrew/Projects/Telegram/td/build/libtdjson.so'}
>>> tdjc = tdjson.td_json_client_create
>>> tdjc
<_FuncPtr object at 0x7f5658758ef0>
>>> tdjc()
30008816
>>> [ 3][t 4][1518046401.150130272][Td.cpp:4296][!Td][&td_requests] Sending update: updateAuthorizationState {
authorization_state = authorizationStateWaitTdlibParameters {
}
}
BTW I already have an id and hash, as I've been using Telethon for some time now. It's just that doing tg_cli <id> <hash> or tg_cli api_id=<id> api_hash=<hash> doesn't work. Thanks again.
libcrypto should be already compiled, libssl can't be shipped without libcrypto, so you just need to find it.
Parameters are accepted by tg_cli in the usual way:
tg_cli --api_id <api_id> --api_hash <api_hash>
any reason why when enabling LTO, build fails
I'm running on stable debian system
LTO requires a lot of support from build tools. LTO greatly improves performance and executable size when it succeeds, but it is very likely to fail, because some of the build tools isn't aware of LTO or has an incompatible version. It is hard to find an exact reason of failure remotely.
LTO is disabled by default in TDLib 1.2.0, so there should be no more build issues.
Most helpful comment
Could you try to disable LTO by commenting line 26 of CMakeLists.txt: