Infactum / tg2sip

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

Build error in Alpine v3.16 #71

Closed AlexanderZhirov closed 1 year ago

AlexanderZhirov commented 1 year ago

Build error in Alpina 3.16. What libraries are missing to install?

# cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 11.2.1
-- The CXX compiler identification is GNU 11.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- Checking for module 'opus'
--   Found opus, version 1.3.1
-- Checking for module 'openssl'
--   Found openssl, version 1.1.1s
-- Checking for module 'libpjproject>=2.8'
--   Found libpjproject, version 2.12.1
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/tg2sip/build
```sh [ 19%] Building C object libtgvoip/CMakeFiles/libtgvoip.dir/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c.o /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp: In member function 'virtual void tgvoip::NetworkSocketPosix::Send(tgvoip::NetworkPacket*)': /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:112:115: note: in expansion of macro 's6_addr' 112 | uint32_t v4part=*((uint32_t *) &translatedAddr->sin6_addr.s6_addr[12]); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:114:99: note: in expansion of macro 's6_addr' 114 | addr170=translatedAddr->sin6_addr.s6_addr; | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:117:99: note: in expansion of macro 's6_addr' 117 | addr171=translatedAddr->sin6_addr.s6_addr; | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:137:56: note: in expansion of macro 's6_addr' 137 | *((uint32_t *) &addr.sin6_addr.s6_addr[12])=v4addr->GetAddress(); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:139:55: note: in expansion of macro 's6_addr' 139 | memcpy(addr.sin6_addr.s6_addr, nat64Prefix, 12); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:141:48: note: in expansion of macro 's6_addr' 141 | addr.sin6_addr.s6_addr[11]=addr.sin6_addr.s6_addr[10]=0xFF; | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:141:75: note: in expansion of macro 's6_addr' 141 | addr.sin6_addr.s6_addr[11]=addr.sin6_addr.s6_addr[10]=0xFF; | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:146:47: note: in expansion of macro 's6_addr' 146 | memcpy(addr.sin6_addr.s6_addr, v6addr->GetAddress(), 16); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp: In member function 'virtual void tgvoip::NetworkSocketPosix::Receive(tgvoip::NetworkPacket*)': /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:220:119: note: in expansion of macro 's6_addr' 220 | if(IN6_IS_ADDR_V4MAPPED(&srcAddr.sin6_addr) || (nat64Present && memcmp(nat64Prefix, srcAddr.sin6_addr.s6_addr, 12)==0)){ | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:221:73: note: in expansion of macro 's6_addr' 221 | in_addr v4addr=*((in_addr *) &srcAddr.sin6_addr.s6_addr[12]); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:225:67: note: in expansion of macro 's6_addr' 225 | lastRecvdV6=IPv6Address(srcAddr.sin6_addr.s6_addr); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp: In member function 'virtual void tgvoip::NetworkSocketPosix::Connect(const tgvoip::NetworkAddress*, uint16_t)': /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:326:37: note: in expansion of macro 's6_addr' 326 | memcpy(v6.sin6_addr.s6_addr, v6addr->GetAddress(), 16); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp: In member function 'virtual std::string tgvoip::NetworkSocketPosix::GetLocalInterfaceInfo(tgvoip::IPv4Address*, tgvoip::IPv6Address*)': /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'const struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:428:62: note: in expansion of macro 's6_addr' 428 | if((addr6->sin6_addr.s6_addr[0] & 0xF0)==0xF0) | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'const struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:431:86: note: in expansion of macro 's6_addr' 431 | *v6addr=IPv6Address(addr6->sin6_addr.s6_addr); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp: In static member function 'static std::string tgvoip::NetworkSocketPosix::V6AddressToString(const unsigned char*)': /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:460:21: note: in expansion of macro 's6_addr' 460 | memcpy(addr.s6_addr, address, 16); | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp: In static member function 'static void tgvoip::NetworkSocketPosix::StringToV6Address(std::string, unsigned char*)': /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:32:33: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? 32 | #define s6_addr __in6_u.__u6_addr8 | ^~~~~~~ /usr/src/tg2sip/libtgvoip/os/posix/NetworkSocketPosix.cpp:474:26: note: in expansion of macro 's6_addr' 474 | memcpy(out, addr.s6_addr, 16); | ^~~~~~~ ```
AlexanderZhirov commented 1 year ago

I commented out a line 32

//#define s6_addr<-----><------><------>__in6_u.__u6_addr8

in the file libtgvoip/os/posix/NetworkSocketPosix.cpp and the build went on, but at the end it again threw out a bunch of errors:

```sh [ 99%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/sip.cpp.o [ 99%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/utils.cpp.o [ 99%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/gateway.cpp.o In file included from /usr/include/pj/limits.h:28, from /usr/include/pj/types.h:34, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from /usr/include/pjsua-lib/pjsua.h:30, from /usr/include/pjsua2/config.hpp:26, from /usr/include/pjsua2/types.hpp:31, from /usr/include/pjsua2/persistent.hpp:26, from /usr/include/pjsua2/endpoint.hpp:26, from /usr/include/pjsua2.hpp:22, from /usr/src/tg2sip/tg2sip/sip.h:22, from /usr/src/tg2sip/tg2sip/sip.cpp:18: /usr/include/pj/compat/limits.h:39:4: warning: #warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " "will be defined by the library in pj/compats/limits.h and " "overridable in config_site.h" [-Wcpp] 39 | # warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \ | ^~~~~~~ In file included from /usr/include/pj/limits.h:28, from /usr/include/pj/types.h:34, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from /usr/include/pjsua-lib/pjsua.h:30, from /usr/include/pjsua2/config.hpp:26, from /usr/include/pjsua2/types.hpp:31, from /usr/include/pjsua2/persistent.hpp:26, from /usr/include/pjsua2/endpoint.hpp:26, from /usr/include/pjsua2.hpp:22, from /usr/src/tg2sip/tg2sip/sip.h:22, from /usr/src/tg2sip/tg2sip/main.cpp:26: /usr/include/pj/compat/limits.h:39:4: warning: #warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " "will be defined by the library in pj/compats/limits.h and " "overridable in config_site.h" [-Wcpp] 39 | # warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \ | ^~~~~~~ In file included from /usr/include/pj/limits.h:28, from /usr/include/pj/types.h:34, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from /usr/include/pjsua-lib/pjsua.h:30, from /usr/include/pjsua2/config.hpp:26, from /usr/include/pjsua2/types.hpp:31, from /usr/include/pjsua2/persistent.hpp:26, from /usr/include/pjsua2/endpoint.hpp:26, from /usr/include/pjsua2.hpp:22, from /usr/src/tg2sip/libtgvoip/VoIPController.h:28, from /usr/src/tg2sip/tg2sip/gateway.h:23, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/include/pj/compat/limits.h:39:4: warning: #warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " "will be defined by the library in pj/compats/limits.h and " "overridable in config_site.h" [-Wcpp] 39 | # warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \ | ^~~~~~~ In file included from /usr/src/tg2sip/tg2sip/gateway.h:24, from /usr/src/tg2sip/tg2sip/main.cpp:27: /usr/src/tg2sip/include/boost/sml.hpp:2528:8: warning: undefining "__has_builtin" 2528 | #undef __has_builtin | ^~~~~~~~~~~~~ In file included from /usr/src/tg2sip/tg2sip/gateway.h:24, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/include/boost/sml.hpp:2528:8: warning: undefining "__has_builtin" 2528 | #undef __has_builtin | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/utils.cpp: In function 'bool is_digits(const string&)': /usr/src/tg2sip/tg2sip/utils.cpp:21:61: error: invalid use of incomplete type 'const string' {aka 'const class std::__cxx11::basic_string'} 21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; | ^~~ In file included from /usr/include/c++/11.2.1/iosfwd:39, from /usr/include/c++/11.2.1/bits/shared_ptr.h:52, from /usr/include/c++/11.2.1/memory:77, from /usr/src/tg2sip/tg2sip/utils.h:21, from /usr/src/tg2sip/tg2sip/utils.cpp:19: /usr/include/c++/11.2.1/bits/stringfwd.h:74:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} 74 | class basic_string; | ^~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/utils.cpp:21:74: error: invalid use of incomplete type 'const string' {aka 'const class std::__cxx11::basic_string'} 21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; | ^~~ In file included from /usr/include/c++/11.2.1/iosfwd:39, from /usr/include/c++/11.2.1/bits/shared_ptr.h:52, from /usr/include/c++/11.2.1/memory:77, from /usr/src/tg2sip/tg2sip/utils.h:21, from /usr/src/tg2sip/tg2sip/utils.cpp:19: /usr/include/c++/11.2.1/bits/stringfwd.h:74:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} 74 | class basic_string; | ^~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/utils.cpp:21:87: error: '::isdigit' has not been declared; did you mean 'iswdigit'? 21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; | ^~~~~~~ | iswdigit make[2]: *** [CMakeFiles/tg2sip.dir/build.make:146: CMakeFiles/tg2sip.dir/tg2sip/utils.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /usr/src/tg2sip/tg2sip/main.cpp:23: /usr/src/tg2sip/tg2sip/queue.h:37:18: error: 'std::optional' has not been declared 37 | void emplace(std::optional &&value) { | ^~~ /usr/src/tg2sip/tg2sip/queue.h:37:31: error: expected ',' or '...' before '<' token 37 | void emplace(std::optional &&value) { | ^ /usr/src/tg2sip/tg2sip/queue.h:44:10: error: 'optional' in namespace 'std' does not name a template type 44 | std::optional pop() { | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:1:1: note: 'std::optional' is defined in header ''; did you forget to '#include '? +++ |+#include 1 | /* /usr/src/tg2sip/tg2sip/queue.h:58:21: error: 'optional' is not a member of 'std' 58 | std::queue> q; | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:58:21: note: 'std::optional' is defined in header ''; did you forget to '#include '? /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 1 is invalid 58 | std::queue> q; | ^ /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 2 is invalid /usr/src/tg2sip/tg2sip/queue.h:58:31: error: expected unqualified-id before '>' token 58 | std::queue> q; | ^~ /usr/src/tg2sip/tg2sip/queue.h: In member function 'void OptionalQueue::emplace(int)': /usr/src/tg2sip/tg2sip/queue.h:40:13: error: 'q' was not declared in this scope 40 | q.emplace(std::move(value)); | ^ /usr/src/tg2sip/tg2sip/queue.h:40:33: error: 'value' was not declared in this scope 40 | q.emplace(std::move(value)); | ^~~~~ In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/sip.cpp:18: /usr/src/tg2sip/tg2sip/queue.h:37:18: error: 'std::optional' has not been declared 37 | void emplace(std::optional &&value) { | ^~~ /usr/src/tg2sip/tg2sip/queue.h:37:31: error: expected ',' or '...' before '<' token 37 | void emplace(std::optional &&value) { | ^ /usr/src/tg2sip/tg2sip/queue.h:44:10: error: 'optional' in namespace 'std' does not name a template type 44 | std::optional pop() { | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:1:1: note: 'std::optional' is defined in header ''; did you forget to '#include '? +++ |+#include 1 | /* /usr/src/tg2sip/tg2sip/queue.h:58:21: error: 'optional' is not a member of 'std' 58 | std::queue> q; | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:58:21: note: 'std::optional' is defined in header ''; did you forget to '#include '? /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 1 is invalid 58 | std::queue> q; | ^ /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 2 is invalid /usr/src/tg2sip/tg2sip/queue.h:58:31: error: expected unqualified-id before '>' token 58 | std::queue> q; | ^~ /usr/src/tg2sip/tg2sip/queue.h: In member function 'void OptionalQueue::emplace(int)': /usr/src/tg2sip/tg2sip/queue.h:40:13: error: 'q' was not declared in this scope 40 | q.emplace(std::move(value)); | ^ /usr/src/tg2sip/tg2sip/queue.h:40:33: error: 'value' was not declared in this scope 40 | q.emplace(std::move(value)); | ^~~~~ /usr/src/tg2sip/tg2sip/sip.cpp: In lambda function: /usr/src/tg2sip/tg2sip/sip.cpp:124:32: error: cannot convert 'sip::events::IncomingCall' to 'int' 124 | events.emplace(events::IncomingCall{ci.id, call->localUser()}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | sip::events::IncomingCall In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/sip.cpp:18: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/sip.cpp: In static member function 'static void sip::Client::init_pj_endpoint(Settings&, sip::LogWriter*)': /usr/src/tg2sip/tg2sip/sip.cpp:188:38: error: 'class pj::Endpoint' has no member named 'codecEnum'; did you mean 'codecEnum2'? 188 | CodecInfoVector codecVector = ep.codecEnum(); | ^~~~~~~~~ | codecEnum2 /usr/src/tg2sip/tg2sip/sip.cpp: In lambda function: /usr/src/tg2sip/tg2sip/sip.cpp:253:36: error: cannot convert 'sip::events::CallStateUpdate' to 'int' 253 | events.emplace(events::CallStateUpdate{call_spt->getId(), call_spt->getInfo().state}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | sip::events::CallStateUpdate In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/sip.cpp:18: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/sip.cpp: In lambda function: /usr/src/tg2sip/tg2sip/sip.cpp:259:36: error: cannot convert 'sip::events::CallMediaStateUpdate' to 'int' 259 | events.emplace(events::CallMediaStateUpdate{call_spt->getId(), call_spt->hasMedia()}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | sip::events::CallMediaStateUpdate In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/sip.cpp:18: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ In file included from /usr/src/tg2sip/tg2sip/tg.h:29, from /usr/src/tg2sip/tg2sip/tg.cpp:18: /usr/src/tg2sip/tg2sip/queue.h:37:18: error: 'std::optional' has not been declared 37 | void emplace(std::optional &&value) { | ^~~ /usr/src/tg2sip/tg2sip/queue.h:37:31: error: expected ',' or '...' before '<' token 37 | void emplace(std::optional &&value) { | ^ /usr/src/tg2sip/tg2sip/queue.h:44:10: error: 'optional' in namespace 'std' does not name a template type 44 | std::optional pop() { | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:1:1: note: 'std::optional' is defined in header ''; did you forget to '#include '? +++ |+#include 1 | /* /usr/src/tg2sip/tg2sip/queue.h:58:21: error: 'optional' is not a member of 'std' 58 | std::queue> q; | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:58:21: note: 'std::optional' is defined in header ''; did you forget to '#include '? /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 1 is invalid 58 | std::queue> q; | ^ /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 2 is invalid /usr/src/tg2sip/tg2sip/queue.h:58:31: error: expected unqualified-id before '>' token 58 | std::queue> q; | ^~ /usr/src/tg2sip/tg2sip/queue.h: In member function 'void OptionalQueue::emplace(int)': /usr/src/tg2sip/tg2sip/queue.h:40:13: error: 'q' was not declared in this scope 40 | q.emplace(std::move(value)); | ^ /usr/src/tg2sip/tg2sip/queue.h:40:33: error: 'value' was not declared in this scope 40 | q.emplace(std::move(value)); | ^~~~~ /usr/src/tg2sip/tg2sip/tg.cpp: In member function 'void tg::Client::process_update(tg::Client::Object)': /usr/src/tg2sip/tg2sip/tg.cpp:127:37: error: cannot convert 'std::remove_reference&>::type' {aka 'td::tl::unique_ptr'} to 'int' 127 | events.emplace(std::move(update)); | ~~~~~~~~~^~~~~~~~ | | | std::remove_reference&>::type {aka td::tl::unique_ptr} In file included from /usr/src/tg2sip/tg2sip/tg.h:29, from /usr/src/tg2sip/tg2sip/tg.cpp:18: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = td::tl::unique_ptr]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: error: 'std::optional' has not been declared 37 | void emplace(std::optional &&value) { | ^~~ /usr/src/tg2sip/tg2sip/queue.h:37:31: error: expected ',' or '...' before '<' token 37 | void emplace(std::optional &&value) { | ^ /usr/src/tg2sip/tg2sip/queue.h:44:10: error: 'optional' in namespace 'std' does not name a template type 44 | std::optional pop() { | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:1:1: note: 'std::optional' is defined in header ''; did you forget to '#include '? +++ |+#include 1 | /* /usr/src/tg2sip/tg2sip/queue.h:58:21: error: 'optional' is not a member of 'std' 58 | std::queue> q; | ^~~~~~~~ /usr/src/tg2sip/tg2sip/queue.h:58:21: note: 'std::optional' is defined in header ''; did you forget to '#include '? /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 1 is invalid 58 | std::queue> q; | ^ /usr/src/tg2sip/tg2sip/queue.h:58:30: error: template argument 2 is invalid /usr/src/tg2sip/tg2sip/queue.h:58:31: error: expected unqualified-id before '>' token 58 | std::queue> q; | ^~ /usr/src/tg2sip/tg2sip/queue.h: In member function 'void OptionalQueue::emplace(int)': /usr/src/tg2sip/tg2sip/queue.h:40:13: error: 'q' was not declared in this scope 40 | q.emplace(std::move(value)); | ^ /usr/src/tg2sip/tg2sip/queue.h:40:33: error: 'value' was not declared in this scope 40 | q.emplace(std::move(value)); | ^~~~~ make[2]: *** [CMakeFiles/tg2sip.dir/build.make:104: CMakeFiles/tg2sip.dir/tg2sip/sip.cpp.o] Error 1 make[2]: *** [CMakeFiles/tg2sip.dir/build.make:90: CMakeFiles/tg2sip.dir/tg2sip/tg.cpp.o] Error 1 /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::DialSip::operator()(Context&, tg::Client&, sip::Client&, td::td_api::object_ptr&, OptionalQueue >&, const Settings&, std::shared_ptr) const': /usr/src/tg2sip/tg2sip/gateway.cpp:207:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 207 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::AnswerTg::operator()(Context&, tg::Client&, const Settings&, OptionalQueue >&, std::shared_ptr) const': /usr/src/tg2sip/tg2sip/gateway.cpp:237:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 237 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::AcceptIncomingSip::operator()(Context&, sip::Client&, const Settings&, const sip::events::IncomingCall&, OptionalQueue >&, std::shared_ptr) const': /usr/src/tg2sip/tg2sip/gateway.cpp:276:64: error: cannot convert 'state_machine::events::InternalError' to 'int' 276 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp:281:64: error: cannot convert 'state_machine::events::InternalError' to 'int' 281 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp:288:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 288 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::AnswerSip::operator()(Context&, sip::Client&, const Settings&, OptionalQueue >&, std::shared_ptr) const': /usr/src/tg2sip/tg2sip/gateway.cpp:306:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 306 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp:311:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 311 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::BridgeAudio::operator()(Context&, sip::Client&, OptionalQueue >&, std::shared_ptr) const': /usr/src/tg2sip/tg2sip/gateway.cpp:388:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 388 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp:393:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 393 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), hangup_prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::DialTg::operator()(Context&, tg::Client&, const Settings&, Cache&, std::chrono::_V2::steady_clock::time_point&, OptionalQueue >&, std::shared_ptr)': /usr/src/tg2sip/tg2sip/gateway.cpp:425:60: error: cannot convert 'state_machine::events::InternalError' to 'int' 425 | internal_events.emplace(state_machine::events::InternalError{ctx.id(), prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::DialTg::dial_by_id(int64_t)': /usr/src/tg2sip/tg2sip/gateway.cpp:457:62: error: cannot convert 'state_machine::events::InternalError' to 'int' 457 | internal_events_->emplace(state_machine::events::InternalError{ctx_->id(), prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::DialTg::dial_by_phone()': /usr/src/tg2sip/tg2sip/gateway.cpp:494:62: error: cannot convert 'state_machine::events::InternalError' to 'int' 494 | internal_events_->emplace(state_machine::events::InternalError{ctx_->id(), prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp:509:62: error: cannot convert 'state_machine::events::InternalError' to 'int' 509 | internal_events_->emplace(state_machine::events::InternalError{ctx_->id(), prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void state_machine::actions::DialTg::dial_by_username()': /usr/src/tg2sip/tg2sip/gateway.cpp:538:62: error: cannot convert 'state_machine::events::InternalError' to 'int' 538 | internal_events_->emplace(state_machine::events::InternalError{ctx_->id(), prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp:551:62: error: cannot convert 'state_machine::events::InternalError' to 'int' 551 | internal_events_->emplace(state_machine::events::InternalError{ctx_->id(), prm}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | state_machine::events::InternalError In file included from /usr/src/tg2sip/tg2sip/sip.h:25, from /usr/src/tg2sip/tg2sip/gateway.h:26, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/tg2sip/queue.h:37:18: note: initializing argument 1 of 'void OptionalQueue::emplace(int) [with T = std::variant]' 37 | void emplace(std::optional &&value) { | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/gateway.cpp: In member function 'void Gateway::start()': /usr/src/tg2sip/tg2sip/gateway.cpp:739:43: error: 'class OptionalQueue >' has no member named 'pop' 739 | if (auto event = internal_events_.pop(); event) { | ^~~ /usr/src/tg2sip/tg2sip/gateway.cpp:745:37: error: 'class OptionalQueue >' has no member named 'pop' 745 | if (auto event = tg_events_.pop(); event) { | ^~~ /usr/src/tg2sip/tg2sip/gateway.cpp:760:38: error: 'class OptionalQueue >' has no member named 'pop' 760 | if (auto event = sip_events_.pop(); event) { | ^~~ make[2]: *** [CMakeFiles/tg2sip.dir/build.make:76: CMakeFiles/tg2sip.dir/tg2sip/main.cpp.o] Error 1 make[2]: *** [CMakeFiles/tg2sip.dir/build.make:160: CMakeFiles/tg2sip.dir/tg2sip/gateway.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/tg2sip.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 ```
AlexanderZhirov commented 1 year ago

I had to add a header file in the tg2sip/queue.h to eliminate one more error. Other errors could not be corrected. I ask for help:

#include <optional>
```sh [ 99%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/logging.cpp.o [ 99%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/utils.cpp.o [ 99%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/gateway.cpp.o In file included from /usr/include/pj/limits.h:28, from /usr/include/pj/types.h:34, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from /usr/include/pjsua-lib/pjsua.h:30, from /usr/include/pjsua2/config.hpp:26, from /usr/include/pjsua2/types.hpp:31, from /usr/include/pjsua2/persistent.hpp:26, from /usr/include/pjsua2/endpoint.hpp:26, from /usr/include/pjsua2.hpp:22, from /usr/src/tg2sip/tg2sip/sip.h:22, from /usr/src/tg2sip/tg2sip/sip.cpp:18: /usr/include/pj/compat/limits.h:39:4: warning: #warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " "will be defined by the library in pj/compats/limits.h and " "overridable in config_site.h" [-Wcpp] 39 | # warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \ | ^~~~~~~ In file included from /usr/include/pj/limits.h:28, from /usr/include/pj/types.h:34, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from /usr/include/pjsua-lib/pjsua.h:30, from /usr/include/pjsua2/config.hpp:26, from /usr/include/pjsua2/types.hpp:31, from /usr/include/pjsua2/persistent.hpp:26, from /usr/include/pjsua2/endpoint.hpp:26, from /usr/include/pjsua2.hpp:22, from /usr/src/tg2sip/tg2sip/sip.h:22, from /usr/src/tg2sip/tg2sip/main.cpp:26: /usr/include/pj/compat/limits.h:39:4: warning: #warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " "will be defined by the library in pj/compats/limits.h and " "overridable in config_site.h" [-Wcpp] 39 | # warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \ | ^~~~~~~ In file included from /usr/include/pj/limits.h:28, from /usr/include/pj/types.h:34, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from /usr/include/pjsua-lib/pjsua.h:30, from /usr/include/pjsua2/config.hpp:26, from /usr/include/pjsua2/types.hpp:31, from /usr/include/pjsua2/persistent.hpp:26, from /usr/include/pjsua2/endpoint.hpp:26, from /usr/include/pjsua2.hpp:22, from /usr/src/tg2sip/libtgvoip/VoIPController.h:28, from /usr/src/tg2sip/tg2sip/gateway.h:23, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/include/pj/compat/limits.h:39:4: warning: #warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " "will be defined by the library in pj/compats/limits.h and " "overridable in config_site.h" [-Wcpp] 39 | # warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \ | ^~~~~~~ In file included from /usr/src/tg2sip/tg2sip/gateway.h:24, from /usr/src/tg2sip/tg2sip/gateway.cpp:19: /usr/src/tg2sip/include/boost/sml.hpp:2528:8: warning: undefining "__has_builtin" 2528 | #undef __has_builtin | ^~~~~~~~~~~~~ In file included from /usr/src/tg2sip/tg2sip/gateway.h:24, from /usr/src/tg2sip/tg2sip/main.cpp:27: /usr/src/tg2sip/include/boost/sml.hpp:2528:8: warning: undefining "__has_builtin" 2528 | #undef __has_builtin | ^~~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/utils.cpp: In function 'bool is_digits(const string&)': /usr/src/tg2sip/tg2sip/utils.cpp:21:61: error: invalid use of incomplete type 'const string' {aka 'const class std::__cxx11::basic_string'} 21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; | ^~~ In file included from /usr/include/c++/11.2.1/iosfwd:39, from /usr/include/c++/11.2.1/bits/shared_ptr.h:52, from /usr/include/c++/11.2.1/memory:77, from /usr/src/tg2sip/tg2sip/utils.h:21, from /usr/src/tg2sip/tg2sip/utils.cpp:19: /usr/include/c++/11.2.1/bits/stringfwd.h:74:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} 74 | class basic_string; | ^~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/utils.cpp:21:74: error: invalid use of incomplete type 'const string' {aka 'const class std::__cxx11::basic_string'} 21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; | ^~~ In file included from /usr/include/c++/11.2.1/iosfwd:39, from /usr/include/c++/11.2.1/bits/shared_ptr.h:52, from /usr/include/c++/11.2.1/memory:77, from /usr/src/tg2sip/tg2sip/utils.h:21, from /usr/src/tg2sip/tg2sip/utils.cpp:19: /usr/include/c++/11.2.1/bits/stringfwd.h:74:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} 74 | class basic_string; | ^~~~~~~~~~~~ /usr/src/tg2sip/tg2sip/utils.cpp:21:87: error: '::isdigit' has not been declared; did you mean 'iswdigit'? 21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); }; | ^~~~~~~ | iswdigit make[2]: *** [CMakeFiles/tg2sip.dir/build.make:146: CMakeFiles/tg2sip.dir/tg2sip/utils.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /usr/src/tg2sip/tg2sip/sip.cpp: In static member function 'static void sip::Client::init_pj_endpoint(Settings&, sip::LogWriter*)': /usr/src/tg2sip/tg2sip/sip.cpp:188:38: error: 'class pj::Endpoint' has no member named 'codecEnum'; did you mean 'codecEnum2'? 188 | CodecInfoVector codecVector = ep.codecEnum(); | ^~~~~~~~~ | codecEnum2 make[2]: *** [CMakeFiles/tg2sip.dir/build.make:104: CMakeFiles/tg2sip.dir/tg2sip/sip.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/tg2sip.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 ```
AlexanderZhirov commented 1 year ago

The problem has been solved. Created instructions for building the apk package.