zelenin / go-tdlib

Go wrapper for TDLib (Telegram Database Library)
MIT License
414 stars 100 forks source link

Unable to build binary with 0.7.3 and 18618ca tdlib #145

Closed Mmx233 closed 5 days ago

Mmx233 commented 5 days ago

Build Environment: Docker Image based on golang:alpine with tdlib 18618ca: mmx233/tdlib

Previous version of zelenin/go-tdlib with older tdlib works fine.

Dockerfile for mmx233/tdlib:

FROM golang:alpine

RUN apk update &&\
    apk upgrade --no-cache &&\
    apk add --no-cache alpine-sdk linux-headers git zlib-dev gperf php cmake libressl-dev zlib-static ccache readline && \
    rm -rf /var/cache/apk/*

WORKDIR /

RUN git clone https://github.com/tdlib/td.git &&\
    cd td &&\
    git checkout 18618ca &&\
    mkdir build && cd build && \
    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local .. && \
    cmake --build . --target install -j6 && \
    rm -rf /td

WORKDIR $GOPATH

Part of Error logs from gcc:

#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(UpdatesManager.cpp.o): in function `td::UpdatesManager::on_update(td::tl::unique_ptr<td::telegram_api::updateDcOptions>, td::Promise<td::Unit>&&)':
#20 27.44 UpdatesManager.cpp:(.text._ZN2td14UpdatesManager9on_updateENS_2tl10unique_ptrINS_12telegram_api15updateDcOptionsEEEONS_7PromiseINS_4UnitEEE+0x2b9): undefined reference to `td::mtproto::ProxySecret::from_binary(td::Slice, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConfigManager.cpp.o): in function `td::decode_config(td::Slice)':
#20 27.44 ConfigManager.cpp:(.text._ZN2td13decode_configENS_5SliceE+0x1ae): undefined reference to `td::mtproto::RSA::from_pem_public_key(td::Slice)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConfigManager.cpp:(.text._ZN2td13decode_configENS_5SliceE+0x5b7): undefined reference to `td::mtproto::RSA::decrypt_signature(td::Slice, td::MutableSlice) const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConfigManager.cpp.o): in function `td::DcOptions::DcOptions(std::vector<td::tl::unique_ptr<td::telegram_api::dcOption>, std::allocator<td::tl::unique_ptr<td::telegram_api::dcOption> > > const&)':
#20 27.44 ConfigManager.cpp:(.text._ZN2td9DcOptionsC2ERKSt6vectorINS_2tl10unique_ptrINS_12telegram_api8dcOptionEEESaIS6_EE[_ZN2td9DcOptionsC5ERKSt6vectorINS_2tl10unique_ptrINS_12telegram_api8dcOptionEEESaIS6_EE]+0x27a): undefined reference to `td::mtproto::ProxySecret::from_binary(td::Slice, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConfigManager.cpp.o): in function `td::ConfigRecoverer::do_on_simple_config(td::Result<td::tl::unique_ptr<td::telegram_api::help_configSimple> >)':
#20 27.44 ConfigManager.cpp:(.text._ZN2td15ConfigRecoverer19do_on_simple_configENS_6ResultINS_2tl10unique_ptrINS_12telegram_api17help_configSimpleEEEEE[_ZN2td15ConfigRecoverer19do_on_simple_configENS_6ResultINS_2tl10unique_ptrINS_12telegram_api17help_configSimpleEEEEE]+0x647): undefined reference to `td::mtproto::ProxySecret::from_binary(td::Slice, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(DeviceTokenManager.cpp.o): in function `td::DeviceTokenManager::register_device(td::tl::unique_ptr<td::td_api::DeviceToken>, std::vector<td::UserId, std::allocator<td::UserId> > const&, td::Promise<td::tl::unique_ptr<td::td_api::pushReceiverId> >)':
#20 27.44 DeviceTokenManager.cpp:(.text._ZN2td18DeviceTokenManager15register_deviceENS_2tl10unique_ptrINS_6td_api11DeviceTokenEEERKSt6vectorINS_6UserIdESaIS7_EENS_7PromiseINS2_INS3_14pushReceiverIdEEEEE+0xbd6): undefined reference to `td::mtproto::DhHandshake::calc_key_id(td::Slice)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(LinkManager.cpp.o): in function `td::LinkManager::get_proxy_link[abi:cxx11](td::Proxy const&, bool)':
#20 27.44 LinkManager.cpp:(.text._ZN2td11LinkManager14get_proxy_linkB5cxx11ERKNS_5ProxyEb+0x447): undefined reference to `td::mtproto::ProxySecret::get_encoded_secret[abi:cxx11]() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(LinkManager.cpp.o): in function `td::LinkManager::parse_tg_link_query(td::Slice, bool)':
#20 27.44 LinkManager.cpp:(.text._ZN2td11LinkManager19parse_tg_link_queryENS_5SliceEb+0x1705): undefined reference to `td::mtproto::ProxySecret::from_link(td::Slice, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: LinkManager.cpp:(.text._ZN2td11LinkManager19parse_tg_link_queryENS_5SliceEb+0x225d): undefined reference to `td::mtproto::ProxySecret::get_encoded_secret[abi:cxx11]() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(LinkManager.cpp.o): in function `td::LinkManager::parse_t_me_link_query(td::Slice, bool)':
#20 27.44 LinkManager.cpp:(.text._ZN2td11LinkManager21parse_t_me_link_queryENS_5SliceEb+0xf88): undefined reference to `td::mtproto::ProxySecret::from_link(td::Slice, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: LinkManager.cpp:(.text._ZN2td11LinkManager21parse_t_me_link_queryENS_5SliceEb+0x121f): undefined reference to `td::mtproto::ProxySecret::get_encoded_secret[abi:cxx11]() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::get_proxy_object(int) const':
#20 27.44 ConnectionCreator.cpp:(.text._ZNK2td17ConnectionCreator16get_proxy_objectEi+0xd2): undefined reference to `td::mtproto::ProxySecret::get_encoded_secret[abi:cxx11]() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::ping_proxy_buffered_socket_fd(td::IPAddress, td::BufferedFd<td::SocketFd>, td::mtproto::TransportType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, td::Promise<double>)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator29ping_proxy_buffered_socket_fdENS_9IPAddressENS_10BufferedFdINS_8SocketFdEEENS_7mtproto13TransportTypeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_7PromiseIdEE+0xc5): undefined reference to `td::mtproto::RawConnection::create(td::IPAddress, td::BufferedFd<td::SocketFd>, td::mtproto::TransportType, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator29ping_proxy_buffered_socket_fdENS_9IPAddressENS_10BufferedFdINS_8SocketFdEEENS_7mtproto13TransportTypeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_7PromiseIdEE+0x1e1): undefined reference to `td::mtproto::create_ping_actor(td::Slice, td::unique_ptr<td::mtproto::RawConnection>, td::unique_ptr<td::mtproto::AuthData>, td::Promise<td::unique_ptr<td::mtproto::RawConnection> >, td::ActorShared<td::Actor>)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::on_test_proxy_handshake(unsigned long, td::Result<td::unique_ptr<td::mtproto::AuthKeyHandshake> >)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator23on_test_proxy_handshakeEmNS_6ResultINS_10unique_ptrINS_7mtproto16AuthKeyHandshakeEEEEE+0x20b): undefined reference to `td::mtproto::AuthKeyHandshake::is_ready_for_finish() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::mtproto::ConnectionManager::ConnectionToken::~ConnectionToken()':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td7mtproto17ConnectionManager15ConnectionTokenD2Ev[_ZN2td7mtproto17ConnectionManager15ConnectionTokenD5Ev]+0x167): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZN2td7mtproto17ConnectionManager15ConnectionTokenD2Ev[_ZN2td7mtproto17ConnectionManager15ConnectionTokenD5Ev]+0x1b2): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZN2td7mtproto17ConnectionManager15ConnectionTokenD2Ev[_ZN2td7mtproto17ConnectionManager15ConnectionTokenD5Ev]+0x213): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::prepare_connection(td::IPAddress, td::SocketFd, td::Proxy const&, td::IPAddress const&, td::mtproto::TransportType const&, td::Slice, td::Slice, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>, td::ActorShared<td::Actor>, bool, td::Promise<td::ConnectionCreator::ConnectionData>)::Callback::on_connected()':
#20 27.44 ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8Callback12on_connectedEv+0x8d): undefined reference to `td::mtproto::ConnectionManager::connection_impl(td::ActorId<td::mtproto::ConnectionManager>, int)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8Callback12on_connectedEv+0xb5): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::ConnectionData::~ConnectionData()':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator14ConnectionDataD2Ev[_ZN2td17ConnectionCreator14ConnectionDataD5Ev]+0x65): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::client_create_raw_connection(td::Result<td::ConnectionCreator::ConnectionData>, bool, td::mtproto::TransportType, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator28client_create_raw_connectionENS_6ResultINS0_14ConnectionDataEEEbNS_7mtproto13TransportTypeEjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj+0x39e): undefined reference to `td::mtproto::create_ping_actor(td::Slice, td::unique_ptr<td::mtproto::RawConnection>, td::unique_ptr<td::mtproto::AuthData>, td::Promise<td::unique_ptr<td::mtproto::RawConnection> >, td::ActorShared<td::Actor>)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator28client_create_raw_connectionENS_6ResultINS0_14ConnectionDataEEEbNS_7mtproto13TransportTypeEjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj+0x65e): undefined reference to `td::mtproto::RawConnection::create(td::IPAddress, td::BufferedFd<td::SocketFd>, td::mtproto::TransportType, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `std::enable_if<td::is_callable<td::ConnectionCreator::request_raw_connection_by_ip(td::IPAddress, td::mtproto::TransportType, td::Promise<td::unique_ptr<td::mtproto::RawConnection> >)::{lambda(td::Result<td::ConnectionCreator::ConnectionData>)#1}, td::Result<td::ConnectionCreator::ConnectionData>, void>::value, void>::type td::detail::LambdaPromise<td::ConnectionCreator::ConnectionData, td::ConnectionCreator::request_raw_connection_by_ip(td::IPAddress, td::mtproto::TransportType, td::Promise<td::unique_ptr<td::mtproto::RawConnection> >)::{lambda(td::Result<td::ConnectionCreator::ConnectionData>)#1}>::do_ok<td::ConnectionCreator::request_raw_connection_by_ip(td::IPAddress, td::mtproto::TransportType, td::Promise<td::unique_ptr<td::mtproto::RawConnection> >)::{lambda(td::Result<td::ConnectionCreator::ConnectionData>)#1}>(td::ConnectionCreator::ConnectionData&&)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td6detail13LambdaPromiseINS_17ConnectionCreator14ConnectionDataEZNS2_28request_raw_connection_by_ipENS_9IPAddressENS_7mtproto13TransportTypeENS_7PromiseINS_10unique_ptrINS5_13RawConnectionEEEEEEUlNS_6ResultIS3_EEE_E5do_okISE_EENSt9enable_ifIXsrNS_11is_callableIT_SD_vEE5valueEvE4typeEOS3_+0x220): undefined reference to `td::mtproto::RawConnection::create(td::IPAddress, td::BufferedFd<td::SocketFd>, td::mtproto::TransportType, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::prepare_connection(td::IPAddress, td::SocketFd, td::Proxy const&, td::IPAddress const&, td::mtproto::TransportType const&, td::Slice, td::Slice, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>, td::ActorShared<td::Actor>, bool, td::Promise<td::ConnectionCreator::ConnectionData>)::Callback::~Callback()':
#20 27.44 ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8CallbackD2Ev+0x64): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::prepare_connection(td::IPAddress, td::SocketFd, td::Proxy const&, td::IPAddress const&, td::mtproto::TransportType const&, td::Slice, td::Slice, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>, td::ActorShared<td::Actor>, bool, td::Promise<td::ConnectionCreator::ConnectionData>)::Callback::~Callback()':
#20 27.44 ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8CallbackD0Ev+0x64): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::prepare_connection(td::IPAddress, td::SocketFd, td::Proxy const&, td::IPAddress const&, td::mtproto::TransportType const&, td::Slice, td::Slice, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>, td::ActorShared<td::Actor>, bool, td::Promise<td::ConnectionCreator::ConnectionData>)::Callback::set_result(td::Result<td::BufferedFd<td::SocketFd> >)':
#20 27.44 ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8Callback10set_resultENS_6ResultINS_10BufferedFdIS2_EEEE+0x1f5): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8Callback10set_resultENS_6ResultINS_10BufferedFdIS2_EEEE+0x583): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8Callback10set_resultENS_6ResultINS_10BufferedFdIS2_EEEE+0x69a): undefined reference to `td::mtproto::ConnectionManager::dec_connect()'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o):ConnectionCreator.cpp:(.text._ZZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEEEN8Callback10set_resultENS_6ResultINS_10BufferedFdIS2_EEEE+0x702): more undefined references to `td::mtproto::ConnectionManager::dec_connect()' follow
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::on_test_proxy_connection_data(unsigned long, td::Result<td::ConnectionCreator::ConnectionData>)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator29on_test_proxy_connection_dataEmNS_6ResultINS0_14ConnectionDataEEE+0x1e1): undefined reference to `td::mtproto::AuthKeyHandshake::AuthKeyHandshake(int, int)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator29on_test_proxy_connection_dataEmNS_6ResultINS0_14ConnectionDataEEE+0x2c9): undefined reference to `td::mtproto::RawConnection::create(td::IPAddress, td::BufferedFd<td::SocketFd>, td::mtproto::TransportType, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator29on_test_proxy_connection_dataEmNS_6ResultINS0_14ConnectionDataEEE+0x453): undefined reference to `td::mtproto::HandshakeActor::HandshakeActor(td::unique_ptr<td::mtproto::AuthKeyHandshake>, td::unique_ptr<td::mtproto::RawConnection>, td::unique_ptr<td::mtproto::AuthKeyHandshakeContext>, double, td::Promise<td::unique_ptr<td::mtproto::RawConnection> >, td::Promise<td::unique_ptr<td::mtproto::AuthKeyHandshake> >)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::ConnectionCreator::prepare_connection(td::IPAddress, td::SocketFd, td::Proxy const&, td::IPAddress const&, td::mtproto::TransportType const&, td::Slice, td::Slice, td::unique_ptr<td::mtproto::RawConnection::StatsCallback>, td::ActorShared<td::Actor>, bool, td::Promise<td::ConnectionCreator::ConnectionData>)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td17ConnectionCreator18prepare_connectionENS_9IPAddressENS_8SocketFdERKNS_5ProxyERKS1_RKNS_7mtproto13TransportTypeENS_5SliceESC_NS_10unique_ptrINS8_13RawConnection13StatsCallbackEEENS_11ActorSharedINS_5ActorEEEbNS_7PromiseINS0_14ConnectionDataEEE+0x7ac): undefined reference to `vtable for td::mtproto::TlsInit'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::Status td::log_event_parse<td::Proxy>(td::Proxy&, td::Slice)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td15log_event_parseINS_5ProxyEEENS_6StatusERT_NS_5SliceE[_ZN2td15log_event_parseINS_5ProxyEEENS_6StatusERT_NS_5SliceE]+0x362): undefined reference to `td::mtproto::ProxySecret::from_link(td::Slice, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(ConnectionCreator.cpp.o): in function `td::BufferSlice td::log_event_store_impl<td::Proxy>(td::Proxy const&, char const*, int)':
#20 27.44 ConnectionCreator.cpp:(.text._ZN2td20log_event_store_implINS_5ProxyEEENS_11BufferSliceERKT_PKci[_ZN2td20log_event_store_implINS_5ProxyEEENS_11BufferSliceERKT_PKci]+0x51f): undefined reference to `td::mtproto::ProxySecret::get_encoded_secret[abi:cxx11]() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ConnectionCreator.cpp:(.text._ZN2td20log_event_store_implINS_5ProxyEEENS_11BufferSliceERKT_PKci[_ZN2td20log_event_store_implINS_5ProxyEEENS_11BufferSliceERKT_PKci]+0x5c0): undefined reference to `td::mtproto::ProxySecret::get_encoded_secret[abi:cxx11]() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(Proxy.cpp.o): in function `td::Proxy::create_proxy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, td::td_api::ProxyType const*)':
#20 27.44 Proxy.cpp:(.text._ZN2td5Proxy12create_proxyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPKNS_6td_api9ProxyTypeE+0x9a): undefined reference to `td::mtproto::ProxySecret::from_link(td::Slice, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(Proxy.cpp.o): in function `td::operator<<(td::StringBuilder&, td::Proxy const&)':
#20 27.44 Proxy.cpp:(.text._ZN2tdlsERNS_13StringBuilderERKNS_5ProxyE+0x158): undefined reference to `td::mtproto::ProxySecret::get_encoded_secret[abi:cxx11]() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(PublicRsaKeySharedCdn.cpp.o): in function `td::PublicRsaKeySharedCdn::get_rsa_key(std::vector<long, std::allocator<long> > const&)':
#20 27.44 PublicRsaKeySharedCdn.cpp:(.text._ZN2td21PublicRsaKeySharedCdn11get_rsa_keyERKSt6vectorIlSaIlEE+0x93): undefined reference to `td::mtproto::RSA::clone() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(PublicRsaKeySharedCdn.cpp.o): in function `td::PublicRsaKeySharedCdn::add_rsa(td::mtproto::RSA)':
#20 27.44 PublicRsaKeySharedCdn.cpp:(.text._ZN2td21PublicRsaKeySharedCdn7add_rsaENS_7mtproto3RSAE+0x40): undefined reference to `td::mtproto::RSA::get_fingerprint() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(PublicRsaKeySharedMain.cpp.o): in function `td::PublicRsaKeySharedMain::get_rsa_key(std::vector<long, std::allocator<long> > const&)':
#20 27.44 PublicRsaKeySharedMain.cpp:(.text._ZN2td22PublicRsaKeySharedMain11get_rsa_keyERKSt6vectorIlSaIlEE+0x67): undefined reference to `td::mtproto::RSA::clone() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(PublicRsaKeySharedMain.cpp.o): in function `td::PublicRsaKeySharedMain::create(bool)':
#20 27.44 PublicRsaKeySharedMain.cpp:(.text._ZN2td22PublicRsaKeySharedMain6createEb+0xed): undefined reference to `td::mtproto::RSA::from_pem_public_key(td::Slice)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: PublicRsaKeySharedMain.cpp:(.text._ZN2td22PublicRsaKeySharedMain6createEb+0x2bc): undefined reference to `td::mtproto::RSA::get_fingerprint() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: PublicRsaKeySharedMain.cpp:(.text._ZN2td22PublicRsaKeySharedMain6createEb+0x459): undefined reference to `td::mtproto::RSA::from_pem_public_key(td::Slice)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: PublicRsaKeySharedMain.cpp:(.text._ZN2td22PublicRsaKeySharedMain6createEb+0x62b): undefined reference to `td::mtproto::RSA::get_fingerprint() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(PublicRsaKeyWatchdog.cpp.o): in function `td::PublicRsaKeyWatchdog::sync_key(std::shared_ptr<td::PublicRsaKeySharedCdn>&)':
#20 27.44 PublicRsaKeyWatchdog.cpp:(.text._ZN2td20PublicRsaKeyWatchdog8sync_keyERSt10shared_ptrINS_21PublicRsaKeySharedCdnEE+0x84): undefined reference to `td::mtproto::RSA::from_pem_public_key(td::Slice)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: PublicRsaKeyWatchdog.cpp:(.text._ZN2td20PublicRsaKeyWatchdog8sync_keyERSt10shared_ptrINS_21PublicRsaKeySharedCdnEE+0x6f9): undefined reference to `td::mtproto::RSA::get_fingerprint() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(Session.cpp.o): in function `td::Session::on_server_salt_updated()':
#20 27.44 Session.cpp:(.text._ZN2td7Session22on_server_salt_updatedEv+0x42): undefined reference to `td::mtproto::AuthData::get_future_salts() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(Session.cpp.o): in function `non-virtual thunk to td::Session::on_server_salt_updated()':
#20 27.44 Session.cpp:(.text._ZThn24_N2td7Session22on_server_salt_updatedEv+0x42): undefined reference to `td::mtproto::AuthData::get_future_salts() const'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(Session.cpp.o): in function `td::Session::connection_online_update(double, bool)':
#20 27.44 Session.cpp:(.text._ZN2td7Session24connection_online_updateEdb+0x7c): undefined reference to `td::mtproto::SessionConnection::set_online(bool, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: Session.cpp:(.text._ZN2td7Session24connection_online_updateEdb+0xb2): undefined reference to `td::mtproto::SessionConnection::set_online(bool, bool)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(Session.cpp.o): in function `td::Session::connection_flush(td::Session::ConnectionInfo*)':
#20 27.44 Session.cpp:(.text._ZN2td7Session16connection_flushEPNS0_14ConnectionInfoE+0x22): undefined reference to `td::mtproto::SessionConnection::flush(td::mtproto::SessionConnection::Callback*)'
#20 27.44 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libtdcore.a(Session.cpp.o): in function `td::Session::connection_close(td::Session::ConnectionInfo*)':
#20 27.44 Session.cpp:(.text._ZN2td7Session16connection_closeEPNS0_14ConnectionInfoE+0x25): undefined reference to 

..........
zelenin commented 5 days ago

try go build --tags=libtdjson. it seems to me that a static link is breaking somewhere

Mmx233 commented 5 days ago

You’re absolutely right; I was able to build a runnable binary again after removing -extldflags "-static" and adding --tags libtdjson to the build command in the builder stage. However, this change requires me to copy and install additional libraries in the runner stage, which has increased the final Docker image size from approximately 40MB to around 130MB. Do you have any suggestions to address this issue, or should I wait for a new version of tdlib?

zelenin commented 5 days ago

my test project (ubuntu) is running statically. Maybe it's about musl/alpine?

Mmx233 commented 5 days ago

Ok, I will try more and update later.