tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.02k stars 1.43k forks source link

mac compile tdlib problem #2934

Open yg66 opened 3 months ago

yg66 commented 3 months ago

local environment

After the build, using the golang client to reference the compiled static library, execution to Gzip.cpp reported an error: [ 0][t 4][1718593876.283946037][Status.h:261][#1][!Session:1:main] Unexpected Status [Error : 0 : zlib inflate init failed: -2] in file /ClionProjects/github.com/tdlib/td/tdutils/td/utils/Gzip.cpp at line 159

How to deal with this problem? Does it have anything to do with the compilation environment/version?

levlam commented 3 months ago

The error should mean incorrect zlib usage, but zlib 1.2.11 is definitely supported and works. It can also happen in the case of heap corruption by other parts of the app, but this is unlikely. Also, if the app has been successfully built it should work.

vincentneo commented 2 months ago

@yg66 Regardless of the zlib error, you might want to try compiling a much newer tdlib commit (such as the latest commit for v1.8.31) as v1.8.0 is very old at this point, maybe it helps.