GNOME Bugzilla – Bug 676726
Fix compilation on android NDK
Last modified: 2012-08-20 13:46:54 UTC
Gio sniffing won't work on android.
Created attachment 219383 [details] [review] patch v1 Sorry I just realized I didn't attached the patch...
Why won't it ?
Because we're cross compiling for ARM and we can't execute the compiled program in configure.
Hmm, so you want to disable the sniffing test when cross-compiling. But do you also want gdk-pixbuf to not use gio for sniffin at runtime ? I think our configury is currently not set up to say 'you can't test gio sniffing at configure time, but use it at runtime anyway'.
The sniffing feature requires shared-mime-info to be installed on the file system, which is not usually possible on Android. However, the test cannot be run when cross compiling anyway, so gdk-pixbuf should probably have a sensible default value for the result of this check when it is being cross compiled.
A default value when cross-compiling is hard to say -- you'll want "no" but in oe-core we'll probably want "yes". If the test is written correctly then the cross-compilation environment can set the result beforehand using the site variables, and it will clearly fail when cross-compiling without a value. (pretty sure glib does this for stuff like structure alignment tests)
Created attachment 220156 [details] [review] patch v2 Following Thomas & Ross comments, it is now obvious to me that this is a cross compilation problem. We can't detect gio-sniff support when cross compiling, therefore the only way to fix this is to add an option to allow force gio-sniff enabled/disabled at configure time.
Looks great to me.
Review of attachment 220156 [details] [review]: Looks fine to me
Pushed to master.