MC now depends on functions provided by libffi. In Android, the libs and cflags have to be added explicitely, as they are not inherited from glib.
OK, I suppose, but the need to do this makes me sad. You really shouldn't need to do this if MC doesn't specifically call ffi_something(). Is there no way to get androgenizer, or indeed the Android libc, to pick up library interdependencies properly? On platforms where it's used, libtool has been solving this problem for a decade and a half, and modern GNU/Linux doesn't need that bit of libtool functionality anyway, because its linker does the right thing. It seems bad that Android is years behind GNU systems...
One way to avoid this problem globally would be for all of our /Android.mk to do: ./configure [...] PKG_CONFIG="pkg-config --static" which means that pkg-config will explicitly request the complete dependency chain of every library: % pkg-config --libs gobject-2.0 -pthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 % pkg-config --static --libs gobject-2.0 -pthread -lgobject-2.0 -lffi -lgthread-2.0 -lglib-2.0 -lrt I'd prefer this approach, assuming it works: I think this is a considerably better long-term solution than hard-coding random extra dependencies in all of our packages.
Fixed the branch with the suggestions made by Simon. Thanks! Btw, we had to fix the glib uninstalled-pc.in files
This change looks fine, but I'd prefer the commit message to say that this is only for Android, and the way you've broken the line makes it rather weird in git tools (have a look at how it looks in gitweb!). Here's how I'd phrase it without hitting the 80ish character limit for the first line: On Android, use pkg-config --static This makes it output the complete dependency chain for each library, e.g. libffi for GObject. This is necessary because Android toolchains don't follow shared library interdependencies like normal GNU toolchains. (Consider this change pre-reviewed for other Telepathy projects that have an Android.mk, too - it should work the same.)
(In reply to comment #3) > Btw, we had to fix the glib uninstalled-pc.in files Please send that change upstream (I assume it consisted of adding libffi to either Libs.private or Requires.private?) - it'll also be necessary if anyone is crazy enough to link GLib statically.
(In reply to comment #4) > This change looks fine, but I'd prefer the commit message to say that this is > only for Android, and the way you've broken the line makes it rather weird in > git tools (have a look at how it looks in gitweb!). > Amended the commit message. Thanks!
(In reply to comment #5) > (In reply to comment #3) > > Btw, we had to fix the glib uninstalled-pc.in files > > Please send that change upstream (I assume it consisted of adding libffi to > either Libs.private or Requires.private?) - it'll also be necessary if anyone > is crazy enough to link GLib statically. Filed bug https://bugzilla.gnome.org/show_bug.cgi?id=672684 I don't have much hope,though, as the uninstalled files were removed in the latest glib version
(In reply to comment #7) > (In reply to comment #5) > > (In reply to comment #3) > > > Btw, we had to fix the glib uninstalled-pc.in files > > > > Please send that change upstream (I assume it consisted of adding libffi to > > either Libs.private or Requires.private?) - it'll also be necessary if anyone > > is crazy enough to link GLib statically. > > Filed bug https://bugzilla.gnome.org/show_bug.cgi?id=672684 > > I don't have much hope,though, as the uninstalled files were removed in the > latest glib version As expected, that bug was closed as WONTFIX.
(In reply to comment #6) > Amended the commit message. Thanks! Ship it. (In reply to comment #7) > > > Btw, we had to fix the glib uninstalled-pc.in files [...] > I don't have much hope,though, as the uninstalled files were removed in the > latest glib version Now seems an ideal time to investigate whether/how you can avoid needing the -uninstalled.pc.in files, then...
commit 370e642d6dc6983fee0ef1fcbedd96ef3a2b3b64 Author: Alvaro Soliverez <alvaro.soliverez@collabora.co.uk> Date: Thu Mar 22 18:05:04 2012 -0300 On Android, use pkg-config --static This makes it output the complete dependency chain for each library, e.g. libffi for GObject. This is necessary because Android toolchains don't follow shared library interdependencies like normal GNU toolchains. commit dcebc508f40abd0eaceb57039e5789638b5297b1 Author: Alvaro Soliverez <alvaro.soliverez@collabora.co.uk> Date: Thu Mar 22 18:04:31 2012 -0300 Use the correct LD_FLAGS variable for the Android target
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.