Please fix the gcc linker invokation in Makefile, place $(LIBS) behind -o $@, otherwise linking with -Wl,--as-needed (which is used on most distros nowadays) fails.
Error:
x86_64-pc-linux-gnu-gcc -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lpng14 -lgthread-2.0 -lrt -lglib-2.0 -lX11 -L/usr/X11R6/lib -lXmu panel.o misc.o bg.o eggtraymanager.o eggmarshalers.o fixedtip.o main.o gdk-helper.o -o trayer-srg
panel.o: In function handle_error':
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:409: undefined reference toXGetErrorText'
panel.o: In function panel_set_wm_strut':
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:66: undefined reference togtk_object_get_type'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:66: undefined reference to g_type_check_instance_cast'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:99: undefined reference toXChangeProperty'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:102: undefined reference to XChangeProperty'
panel.o: In functionpanel_size_alloc':
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to gtk_window_get_type'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference tog_type_check_instance_cast'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to gtk_window_move'
panel.o: In functionpanel_destroy_event':
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:150: undefined reference to `gtk_main_quit'
(a ton of similar "undefined reference"s)
Please fix the gcc linker invokation in Makefile, place $(LIBS) behind -o $@, otherwise linking with -Wl,--as-needed (which is used on most distros nowadays) fails.
Error:
x86_64-pc-linux-gnu-gcc -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lpng14 -lgthread-2.0 -lrt -lglib-2.0 -lX11 -L/usr/X11R6/lib -lXmu panel.o misc.o bg.o eggtraymanager.o eggmarshalers.o fixedtip.o main.o gdk-helper.o -o trayer-srg
panel.o: In function
handle_error':XGetErrorText'/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:409: undefined reference to
panel.o: In function
panel_set_wm_strut':gtk_object_get_type'/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:66: undefined reference to
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:66: undefined reference to
g_type_check_instance_cast'XChangeProperty'/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:99: undefined reference to
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:102: undefined reference to
XChangeProperty'panel_size_alloc':panel.o: In function
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to
gtk_window_get_type'g_type_check_instance_cast'/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to
gtk_window_move'panel_destroy_event':panel.o: In function
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:150: undefined reference to `gtk_main_quit'
(a ton of similar "undefined reference"s)
Fix
http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=blob;f=x11-misc/trayer-srg/files/trayer-srg-1.1.2-as-needed.patch;h=851b21f0eabecf83e3c87deeb3eab06c0e0755bd;hb=99bce18f66447dd744e3842af278c9d7b7a5dc39
--- trayer-srg-1.1.2/Makefile
+++ trayer-srg-1.1.2/Makefile
@@ -19,7 +19,7 @@
TARGET = trayer
$(TARGET): $(OBJ)
Arch linux ( http://aur.archlinux.org/packages.php?ID=36049 ) clears the LDFLAGs, which is just wrong, imho.