zevlg / telega.el

GNU Emacs telegram client (unofficial)
https://zevlg.github.io/telega.el/
GNU General Public License v3.0
1.09k stars 85 forks source link

Not starting (Linux) #462

Closed agzam closed 5 months ago

agzam commented 5 months ago

Stopped working and I can't figure out how to use it again.

I tried:

With tdlib I tried:

I tried building the server using M-x telega-server-build and make server-reinstall in the telega.el.

Has something changed in tdlib that now you have to manually set the API key? How do you do that?

Can someone please help me figure out the correct sequence of steps to get it to work? Thanks!

Telega Setup

OS: Arch Linux Emacs: GNU Emacs 30.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.39, cairo version 1.18.0) Telega: telega v0.8.03 (TDLib v1.8.25) (telega-server v0.7.13)

zevlg commented 5 months ago

Telega: telega v0.8.03 (TDLib v1.8.25) (telega-server v0.7.13)

The problem with your installation is that you are trying to run very old telega release with the bleading edge TDLib. Use telega 0.8.250 from master to run with TDLib 1.8.25

To run telega 0.8.03 release you should use TDLib 1.8.0 realese. But I recommend you to switch to telega from master / MELPA unstable instead of using this very old release.

agzam commented 5 months ago

I did use the package from the default branch, not from MELPA, directly from GitHub. I only tried switching to release-0.8.0 branch because that didn't work.

When I try to start it with M-x telega, it prompts:

Installed `telega-server' version 0.0.0-unknown<0.7.7, rebuild? (y or n) y

and then, it fails:

error log make -C server clean make[1]: Entering directory '/home/ag/.emacs.d/.local/straight/build-30.0.50/telega/server' make[1]: Leaving directory '/home/ag/.emacs.d/.local/straight/build-30.0.50/telega/server' make -C server install make[1]: Entering directory '/home/ag/.emacs.d/.local/straight/build-30.0.50/telega/server' cc -I/usr/local/include -Wall -g -pthread -DWITH_APPINDICATOR -DWITH_AYATANA_APPINDICATOR `pkg-config --cflags ayatana-appindicator3-0.1` -o telega-server telega-server.c telega-dat.c telega-pngext.c telega-appindicator.c -L/usr/local/lib -Wl,-rpath,/usr/local/lib -ltdjson `pkg-config --libs ayatana-appindicator3-0.1` In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:34, from /usr/include/glib-2.0/glib/galloca.h:34, from /usr/include/glib-2.0/glib.h:32, from /usr/include/gtk-3.0/gdk/gdkconfig.h:8, from /usr/include/gtk-3.0/gdk/gdk.h:30, from /usr/include/gtk-3.0/gtk/gtk.h:30, from /usr/include/libayatana-appindicator3-0.1/libayatana-appindicator/app-indicator.h:33, from telega-appindicator.c:38: telega-appindicator.c: In function ‘appindicator_setup’: telega-appindicator.c:63:26: warning: implicit declaration of function ‘IS_APP_INDICATOR’; did you mean ‘APP_INDICATOR’? [-Wimplicit-function-declaration] 63 | g_assert(IS_APP_INDICATOR(appind)); | ^~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gmacros.h:1246:25: note: in definition of macro ‘G_LIKELY’ 1246 | #define G_LIKELY(expr) (expr) | ^~~~ telega-appindicator.c:63:17: note: in expansion of macro ‘g_assert’ 63 | g_assert(IS_APP_INDICATOR(appind)); | ^~~~~~~~ /usr/bin/ld: /tmp/ccm1WNwO.o: in function `appindicator_setup': /home/ag/.emacs.d/.local/straight/build-30.0.50/telega/server/telega-appindicator.c:63:(.text+0x86): undefined reference to `IS_APP_INDICATOR' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:41: telega-server] Error 1 make[1]: Leaving directory '/home/ag/.emacs.d/.local/straight/build-30.0.50/telega/server' make: *** [Makefile:12: server-reinstall] Error 2
zevlg commented 5 months ago

This is problem with your local libayataba-appindicator installation. Fix it or edit server/Makefile in the telega source directory to disable compilation with appindicator library

agzam commented 5 months ago

Oh wow... Turns out it was a simple fix. I don't know why I've wasted so much time, I just needed to pay closer attention to the error message.

Removing all previous tdlib instances and installing telegram-tdlib-git and libappindicator-gtk3 fixed it for me. I guess libappindicator is not such an "optional dependency" as stated in the readme.

Thank you, @zevlg! Even though I've only been using telega.el occasionally, it has become such an essential tool for me. Not having it caused a lot of frustration.