Comments (10)
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}")
from td.
Which c++ compiler do you use? And which Linux?
from td.
@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
from td.
@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
from td.
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.
from td.
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.
from td.
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>
from td.
any reason why when enabling LTO, build fails
I'm running on stable debian system
from td.
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.
from td.
LTO is disabled by default in TDLib 1.2.0, so there should be no more build issues.
from td.
Related Issues (20)
- Need manually free return memory when use td_receive in ptyhon ? HOT 3
- [Advice] Need to find out if there're a way to fix an .ogg file broken due to using pause during recording the voice HOT 2
- 'Similar Channels' in TDLib HOT 2
- cannot edit message forwarded by bot HOT 1
- chat admin required for GetMegagroupStats HOT 3
- Based on TDlib, I now implement event monitoring for multiple account clients. Whenever I receive UpdateNewMessage, how should I distinguish which account client this message belongs to? Based on java HOT 2
- getting telegram messages from supergroup HOT 4
- Building tdweb results in RangeError HOT 6
- Receiving messages is stopping intermittently HOT 10
- Receiving message history from several chats at once HOT 3
- tdlib Versionsnumber HOT 2
- Warning in test/http.cpp while compile HOT 1
- Account is cancelled HOT 1
- How to understand that this is a link to a bot? HOT 2
- Share phone number with bot HOT 2
- Separate message_ids in the same post HOT 3
- PHP code fails to compile: `Unsupported tl-schema version -1` HOT 10
- Unknown error in class "messageReplyToMessage" HOT 1
- "Request is empty" on authorization in Ubuntu HOT 4
- How do I launch the bot correctly? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from td.