Compiling Telegram Desktop on a 2GB VPS: A Survival Guide
Preface
My VPS configuration
2 vCPU
2GB RAM
120GB Disk
Want to compile the https://github.com/forkgram/tdesktop project
Agent-Oriented Development
Hermes connecting to mimo-v2.5-pro
The content in the quote blocks below is the natural language I sent to the Agent
把 https://github.com/forkgram/tdesktop clone到本地, 并完成编译
Agent feedback:
Tried several times, always failed
分析一下你做过了什么, 得到什么结果
Agent feedback:
发现需要 40+ 外部库 (ada, openssl, ffmpeg, qt, webrtc...)
这些库需要预先编译安装到 /usr/local 或 ../Libraries
- 这个过程只能全部成功或全部失败吗? 能不能一个一个编译?
The Agent switched to compiling one by one.
Result: when compiling qtgui, memory ran out and compilation was aborted.Later, the agent found a way: install Qt, then use DESKTOP_APP_USE_PACKAGED=ON
Qt no longer needs to be compiled.
Then, the compilation of tg_owt (WebRTC) was completed.
But still, memory ran out when finally generating telegram.
Tried a solution: increase swap space
Changed to 4GB, still ran out of memory
Changed to 8GB, compilation succeeded
The compilation took a very long time, especially since my VPS uses HDD instead of SSD.
You can set a scheduled task for the Agent
给你自己设置一个30分钟的定时任务
用于监控 tdesktop 编译的进度
如果编译出错, 检查出错原因, 修复, 再次开始编译
Conclusion
If you only have a 2GB memory VPS, you can still do telegram development.
It just takes a particularly long time on compilation.
Not recommended at all.
========