Hello to all friends of Gnash! I'm proud and fortunate to be enrolled in the mailing list for I'm now trying to port Redhat SPICE client on to Android.
It's TOUGH,and you Gnash-android-porting guys will definitely agree
with this. the Spice client is written in C++, but even I can overcome
the C++ support problem in Android,I still have to move to the spicec
version written in C/GTK because C is more 'safer' in Android than C++,
and anyway the UI of it must be inevitably rewrote in JAVA.
But now comes the glib problems in porting to android. I referenced the instructions in http://wiki.gnashdev.org/AndroidDependencies and I met more troubles in glib building(so I need to write a patch)
1.I use the android NDK provided by Mozzila which has nearly full C++ support: http://ftp.mozilla.org/pub/mozilla.org/mobile/source/android-ndk-r4c-0moz3.tar.bz2
and I have modified Andrew Ross's agcc to partner with this NDK: http://blog.csdn.net/rozenix/archive/2011/02/28/6212994.aspx
2. Then I cross compile glib2.28.1 onto Android in this order: 1)libiconv-1.13.1.tar.gz: 2)gettext-0.18.1.1.tar.gz But the build of gettext has not fully succeeded,never mind, I need only libintl.so, so just make install. 3) glib-2.28.1.tar.gz 1st, do patching with my attached file
(these are all that I found that have to be modified, mostly in the gio/ files, for there is nearly no arp/*.h in Android, is my patching safe and right?)
2nd, write this into the cache file arm.cache: glib_cv_stack_grows=no
glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no 3rd, configured the same as libiconv: configured by: CC=agcc CXX=agcc LD=arm-eabi-ld RANLIB=arm-eabi-ranlib \
PKG_CONFIG_LIBDIR=/data/local/lib/pkgconfig:/data/local/share/pkgconfig/ \ ./configure \ --prefix=/data/local \ --host=arm-eabi-linux \ --enable-malloc0returnsnull \ --enable-shared \ 4th, remove the -lpthread in gthread/Makefile. 5td, make;make install
But when using the libglib,libgio,libgobj..,I got plenty of SIGBUS and SIGSEGFAULT. Have you met these? The glib mechanism is still too arcane for me. Is my patching right? PS, The android-bluetooth module DOES have glib included, it uses only
libglib, and now I've compiled it under android souce into
libglib.so,but it's not usable to my spicec-gtk for it's glib-2.0-20 which
cannot afford some methods such as "g_byte_array_unref".etc,and there's
none libgio/libgthread/libgmodule which are also needed by spicec-glib. In tracing the bug,the segfault/sigbus comes from libgobj and my patching work is mainly in libgio. And I have found no clue of successful use of libgio..etc. in Android.
So now, I think the problems are basically from two points:(suppose the spice-gtk has no wrong-use of glib)
1. The compiling fault such as the incorrect alignment setting which is the sin of the sigbus 2. The danger in the patching of the definitions from arpa/nameser*.h into gio/gresolver.c..,etc. which may cause segfault.
Where can I get the libglib.so used by Gnash-android? Does it also use libgio/libgthread..? Is there anyone who have succeeded in using libgio,etc, in Android? Anybody can give me some instructions of testing the sanity of libg*?
Appreciating!