Infactum / tg2sip

Telegram <-> SIP voice gateway
GNU General Public License v2.0
273 stars 104 forks source link

Could not find a configuration file for package "Td" that is compatible with requested version "1.7.10". #57

Closed Wise71 closed 2 years ago

Wise71 commented 2 years ago

Trying to install tg2sip and getting error:

/usr/src/tg2sip/build# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig && cmake -DCMAKE_BUILD_TYPE=Release -DTd_DIR=/usr/src/td/tdlib/lib/cmake/Td/ -DCMAKE_INSTALL_PREFIX:PATH=.. ..
CMake Error at CMakeLists.txt:10 (find_package):
  Could not find a configuration file for package "Td" that is compatible
  with requested version "1.7.10".

  The following configuration files were considered but not accepted:

    /usr/src/td/tdlib/lib/cmake/Td/TdConfig.cmake, version: 1.8.1
    /usr/src/td/TdConfig.cmake, version: unknown
Infactum commented 2 years ago

Current gateway branch was build against TdLib 1.7.10. There is no direct commit with this version in tdlib repository, so you should use direct commit hash. See docker build env scripts for details: https://github.com/Infactum/tg2sip/blob/c45b30924cb1ab365d78992dd556b7ec251756f2/buildenv/Dockerfile.centos7#L23-L35

Wise71 commented 2 years ago

Thank you. But now i have another error:

[ 98%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/utils.cpp.o /usr/src/tg2sip/tg2sip/utils.cpp:21:64: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >' bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; ^ /usr/lib/llvm-10/bin/../include/c++/v1/iosfwd:209:32: note: template is declared here class _LIBCPP_TEMPLATE_VIS basic_string; ^ /usr/src/tg2sip/tg2sip/utils.cpp:21:77: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >' bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; ^ /usr/lib/llvm-10/bin/../include/c++/v1/iosfwd:209:32: note: template is declared here class _LIBCPP_TEMPLATE_VIS basic_string; ^ /usr/src/tg2sip/tg2sip/utils.cpp:21:87: error: no member named 'isdigit' in the global namespace; did you mean 'is_digits'? bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; ~~^~~~~~~ is_digits /usr/src/tg2sip/tg2sip/utils.cpp:21:6: note: 'is_digits' declared here bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; ^ 3 errors generated. make[2]: *** [CMakeFiles/tg2sip.dir/build.make:128: CMakeFiles/tg2sip.dir/tg2sip/utils.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/tg2sip.dir/all] Error 2 make: *** [Makefile:84: all] Error 2