GNOME Bugzilla – Bug 724369
freebox plugin fails to link against avahi-glib and avahi-client
Last modified: 2014-02-18 11:47:57 UTC
The freebox plugin links against three avahi libs: avahi-gobject (which is the only specified in configure.ac) avahi-client avahi-glib I discovered this while creating a Portfile for macports, so maybe this bug is not reproducible on other platforms because of the way macports compiles avahi.
Created attachment 269128 [details] [review] Check for avahi-glib and avahi-client
Those are already in avahi-gobject's requirements: Requires.private: glib-2.0 gobject-2.0 avahi-glib avahi-client so it should work already. What error did you see?
I think I don't fully understand what you refer to. Do you mean that e.g. pkg-config --libs avahi-gobject shall yield -lavahi-gobject -lavahi-client -lavahi-glib ... (and possibly others, and various -L) ? In my system the result of pkg-config --libs avahi-gobject is: -L/opt/local/lib -lavahi-gobject
(In reply to comment #3) > I think I don't fully understand what you refer to. Do you mean that e.g. > pkg-config --libs avahi-gobject shall yield -lavahi-gobject -lavahi-client > -lavahi-glib ... (and possibly others, and various -L) ? > > In my system the result of pkg-config --libs avahi-gobject is: > -L/opt/local/lib -lavahi-gobject Again, what run-time, compile-time or linking error did you see?
Sorry. Here's the linking error. I'll attach the full log anyways. libtool: link: /usr/bin/clang -o .libs/libgrlfreebox.so -bundle .libs/libgrlfreebox_la-grl-freebox.o .libs/libgrlfreebox_la-freebox-monitor.o .libs/libgrlfreebox_la-freeboxresources.o -L/opt/local/lib -lgrlpls-0.2 -lgrilo-0.2 -lgmodule-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lxml2 -lavahi-gobject -Os -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64 Undefined symbols for architecture x86_64: "_avahi_client_free", referenced from: _freebox_monitor_finalize in libgrlfreebox_la-freebox-monitor.o "_avahi_client_new", referenced from: _freebox_monitor_init in libgrlfreebox_la-freebox-monitor.o "_avahi_glib_poll_free", referenced from: _freebox_monitor_finalize in libgrlfreebox_la-freebox-monitor.o "_avahi_glib_poll_get", referenced from: _freebox_monitor_init in libgrlfreebox_la-freebox-monitor.o "_avahi_glib_poll_new", referenced from: _freebox_monitor_init in libgrlfreebox_la-freebox-monitor.o "_avahi_service_browser_free", referenced from: _freebox_monitor_finalize in libgrlfreebox_la-freebox-monitor.o "_avahi_service_browser_new", referenced from: _on_client_state_changed in libgrlfreebox_la-freebox-monitor.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [libgrlfreebox.la] Error 1
Created attachment 269463 [details] Build log
Review of attachment 269128 [details] [review]: Looks good.
commit 1a7b364818c65679e9398d0049d11070ee22d0b0 Author: Juan R. Garcia Blanco <juanrgar@gmail.com> Date: Fri Feb 14 16:55:43 2014 +0100 freebox: Check for avahi-glib and avahi-client freebox plugin links against libavahi-client and libavahi-glib, in addition to libavahi-gobject. https://bugzilla.gnome.org/show_bug.cgi?id=724369 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)