Package Details: telegram-tdlib-purple-git 0.8.1.r523.d220fa8-2

Git Clone URL: https://aur.archlinux.org/telegram-tdlib-purple-git.git (read-only, click to copy)
Package Base: telegram-tdlib-purple-git
Description: libpurple/pidgin Telegram plugin implemented using official tdlib client library
Upstream URL: https://github.com/BenWiederhake/tdlib-purple/
Keywords: bitlbee libpurple pidgin tdlib telegram
Licenses: GPL2, LGPL2.1, custom:FTL, custom:PIX, custom:RPD, custom:SKIA, custom:STB
Conflicts: telegram-tdlib-purple
Provides: telegram-tdlib-purple
Submitter: mk-fg
Maintainer: mk-fg
Last Packager: mk-fg
Votes: 10
Popularity: 0.013630
First Submitted: 2020-06-27 20:23 (UTC)
Last Updated: 2025-05-30 21:14 (UTC)

Required by (0)

Sources (2)

Pinned Comments

mk-fg commented on 2021-12-07 14:44 (UTC) (edited on 2023-09-23 21:26 (UTC) by mk-fg)

If you're getting error like this on login:

Login error: Authentication error: code 400 (API_ID_PUBLISHED_FLOOD)

Check https://core.telegram.org/api/obtaining_api_id URL, for generating your own api_id/api_hash values (only a couple clicks), and specify those in the plugin parameters.

Latest Comments

1 2 3 4 5 Next › Last »

PhotonX commented on 2025-05-31 14:23 (UTC)

Thanks, it was actually exactly the issue, I was too impatient and assumed that something got stuck, while it actually just needed a very long time to complete the linking!

mk-fg commented on 2025-05-31 12:06 (UTC) (edited on 2025-05-31 13:12 (UTC) by mk-fg)

Oh, I think you might mean "stuck" as in "taking too long wall-clock time to move past that point" - that seem to be unfortunately normal for td library build.

It takes plenty of cpu (and memory in some places) to build (iirc like 30min on 4 cores of somewhat old Ryzen 5600X with 32G RAM here), so I think you can either wait or e.g. add more zram, if memory/swapping is what slows it down to a crawl.

Haven't looked into which parts of the build take what wrt resources, but maybe "run_all_tests" part is non-critical and you can also disable it? Quickly checking via ccmake, I don't see any obvious on/off flag for it, though maybe it's documented how to do it, or can probably patch it out too. Can also just leave it running overnight, as mentioned, if there isn't any more difficult bottleneck than just CPU power/time.

Another option might be using pre-built td library for the plugin, e.g. downloaded from somewhere trustworthy (and working with Arch libs), and use path to where it's installed with -DTd_DIR= in PKGBUILD. This plugin links it statically, so it won't be needed after the build.

Wrt sqlite3.c I also get those warnings here, seem to be non-critical:

[ 36%] Building CXX object CMakeFiles/tdcore.dir/td/telegram/AttachMenuManager.cpp.o
/usr/src/debug/telegram-tdlib-purple-git/telegram-tdlib-purple-git/td/sqlite/sqlite/sqlite3.c: In function ‘tdsqlite3SelectNew’:
/usr/src/debug/telegram-tdlib-purple-git/telegram-tdlib-purple-git/td/sqlite/sqlite/sqlite3.c:131688:10: warning: function may return address of local variable [-Wreturn-local-addr]
/usr/src/debug/telegram-tdlib-purple-git/telegram-tdlib-purple-git/td/sqlite/sqlite/sqlite3.c:131648:10: note: declared here
[ 36%] Building CXX object CMakeFiles/tdcore.dir/td/telegram/AudiosManager.cpp.o

mk-fg commented on 2025-05-31 11:50 (UTC)

Hm, worked for me yesterday, but I probably haven't ran "pacman -Syu" in a week or so...

But also, given that it's on a linker step, maybe try nuking build-cache in ~/.cache/yay/telegram-tdlib-purple-git/src/telegram-tdlib-purple-git/td/ or just whole ~/.cache/yay/telegram-tdlib-purple-git - seem to happen to me sometimes too when build tools update, but dunno if it's the same type of issue.

PhotonX commented on 2025-05-31 11:44 (UTC)

The build gets stuck at

[100%] Linking CXX executable run_all_tests
/home/photon/.cache/yay/telegram-tdlib-purple-git/src/telegram-tdlib-purple-git/td/sqlite/sqlite/sqlite3.c: In Funktion »tdsqlite3SelectNew«:
/home/photon/.cache/yay/telegram-tdlib-purple-git/src/telegram-tdlib-purple-git/td/sqlite/sqlite/sqlite3.c:131688:10: Warnung: Funktion liefert möglicherweise Adresse einer lokalen Variablen zurück [-Wreturn-local-addr]
131688 |   return pNew;
       |          ^
/home/photon/.cache/yay/telegram-tdlib-purple-git/src/telegram-tdlib-purple-git/td/sqlite/sqlite/sqlite3.c:131648:10: Anmerkung: hier deklariert
131648 |   Select standin;
       |          ^

mk-fg commented on 2025-05-30 21:17 (UTC)

Added -DCMAKE_POLICY_VERSION_MINIMUM=3.5 as a workaround as cmake suggests. Build seem to work, so probably good enough for now.

Thanks for reporting.

nkeck72 commented on 2025-05-30 15:31 (UTC)

Looks like this package has been snagged with Arch's CMake updates, which have removed support for CMake behavior pre-3.5:

~/.cache/yay/telegram-tdlib-purple-git/src/td ~/.cache/yay/telegram-tdlib-purple-git/src/telegram-tdlib-purple-git
HEAD is now at 3870c29b1 Update version to 1.8.21.
~/.cache/yay/telegram-tdlib-purple-git/src/td/build ~/.cache/yay/telegram-tdlib-purple-git/src/td ~/.cache/yay/telegram-tdlib-purple-git/src/telegram-tdlib-purple-git
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

This should be a simple patch to change cmake_minimum_required() unless upstream explicitly relies on some old behavior. I tried a couple of clean builds to remove stale sources and it's still present, so until upstream updates their CMakeLists a workaround for building for now would be to patch where possible.

Traace commented on 2024-11-02 17:27 (UTC)

Thanks for this package. Voted :)

mikearch commented on 2024-07-08 20:21 (UTC)

The latest iteration of the packagebuildfile works like a charm :)

mk-fg commented on 2024-07-07 17:55 (UTC)

Updated PKGBUILD as mentioned, it seem to build with newer tdlib and works for me, but dunno if it will for new users - please report if it doesn't, I'll probably mark this as outdated/abandoned if that's the case.

mk-fg commented on 2024-07-04 22:20 (UTC) (edited on 2024-07-04 22:20 (UTC) by mk-fg)

Source isn't updated. Same thing have also been reported in purple-dev telegram group, so it's likely not a fluke. This doesn't seem to happen when I reconnect, so maybe only happens for first-time app authorizations.

There seem to be a fork updated to build with more up-to-date tdlib here:

https://github.com/savoptik/tdlib-purple/

(also mentioned here - https://github.com/BenWiederhake/tdlib-purple/pull/6 )

I'll try switching to that repo and pinning build to a specific commit from there - might resolve the issue, if it builds with more recent tdlib.