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

Telega server compilation fails #481

Closed nameiwillforget closed 5 days ago

nameiwillforget commented 2 months ago

Building the Telega server fails.

Telega Setup

OS: Linux gentoolaptop 6.6.28-gentoo-dist-hardened #1 SMP PREEMPT_DYNAMIC Tue May 7 15:26:11 CEST 2024 x86_64 AMD Ryzen 7 5700U with Radeon Graphics AuthenticAMD GNU/Linux Emacs: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw scroll bars) of 2024-05-30 Telega: 0.8.256

Installed through use-package.

Current Behavior

Prints the following error:

/usr/bin/gmake -C server clean
gmake[1]: Entering directory '/home/alex/.emacs.d/elpa/telega-20240509.1735/server'
gmake[1]: Leaving directory '/home/alex/.emacs.d/elpa/telega-20240509.1735/server'
/usr/bin/gmake -C server install
gmake[1]: Entering directory '/home/alex/.emacs.d/elpa/telega-20240509.1735/server'
cc -I/usr//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//lib -Wl,-rpath,/usr//lib -ltdjson `pkg-config --libs ayatana-appindicator3-0.1`
In file included from /usr/lib64/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/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr//lib/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr//lib/libc.a when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccfmQs4q.o: in function `appindicator_setup':
/home/alex/.emacs.d/elpa/telega-20240509.1735/server/telega-appindicator.c:63:(.text+0x8e): undefined reference to `IS_APP_INDICATOR'
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:41: telega-server] Error 1
gmake[1]: Leaving directory '/home/alex/.emacs.d/elpa/telega-20240509.1735/server'
gmake: *** [Makefile:12: server-reinstall] Error 2

Steps to Reproduce

  1. Install Telega through use-package.
  2. Install tdlib from the Akater repository.
  3. Run Telega and answer yes when it asks to build the server.
flexibeast commented 5 days ago

i just hit this myself. As per the error message, changing line 63 of telega-appindicator.c from

g_assert(IS_APP_INDICATOR(appind));

to

g_assert(APP_INDICATOR(appind));

resolved the issue.