GNOME Bugzilla – Bug 334934
test-ve-config does not build in certain circumstances
Last modified: 2006-03-21 01:08:17 UTC
In gdm-2.14.0, the test program for vicious-extensions (test-ve-config) fails to build if glib&Co libraries are available only in static form, or --as-needed linker option is used: gcc -O2 -Wall -Wmissing-prototypes -o test-ve-config test-ve-config.o -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lz -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ../vicious-extensions/libvicious.a ../vicious-extensions/libvicious.a(ve-config.o): In function `free_line':ve-config.c:(.text+0x60): undefined reference to `g_free' :ve-config.c:(.text+0x72): undefined reference to `g_free' :ve-config.c:(.text+0x81): undefined reference to `g_free' and so on.
Created attachment 61463 [details] [review] Makefile.am.diff Proposed fix.
I'm not sure how to fix this. I think GDM just depends on pkg-config to return the correct linker/compile options to glib&co, so perhaps these aren't set right on your machine to build with static libraries? Not sure. If the problem is with GDM's Makefile's or such, I'd accept a patch that would fix this problem (assuming it doesn't break the build when linking against non-static libraries).
Oh, sorry, I totally missed the proposed patch you attached. I see it now, and just applied it to CVS head. Looks good. Thanks.
Created attachment 61652 [details] [review] Makefile.am.diff Oops, there is a typo (missing backslash) in the patch I submitted. The patch I actually tested was made for 2.14.0.
Thanks for catching this. This is now fixed again in CVS.