Rygel on Android using NDK



Hello,
I am planning to port Rygel to Android using the NDK. I have seen there
is already some work done for some of its dependencies like GStreamer
(from 0.10.32 in Git there are some makefiles), Glib, libuuid...
I am just a newbie in developing android apps, and I would like to know
if it is possible to make run Rygel on Android using the NDK to build it
or is there any effort already done?

I have already tried to compile Rygel using static libraries for not
having any dependencies once executing it inside Dalvik, but I got no
success. I had to make my own static library for gupnp-av (or gupnp) as
they share some xml functions with the same name. And once specified all
the static libraries it was asking it gives this kind of warnings when
compiling:

a.s/libgmodule-2.0.a(gmodule.o): In function `g_module_open':
(.text+0x800): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libdbus-1.a(dbus-sysdeps-unix.o): In function `fill_user_info':
dbus-sysdeps-unix.c:(.text.fill_user_info+0x225): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libgio-2.0.a(glocalfileinfo.o): In function `lookup_gid_name':
(.text+0x20fa): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libgio-2.0.a(glocalvfs.o): In function `g_local_vfs_parse_name':
(.text+0x26c): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x1215): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x1208): warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x1220): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libdbus-1.a(dbus-sysdeps-unix.o): In function `fill_user_info':
dbus-sysdeps-unix.c:(.text.fill_user_info+0xf4): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libgio-2.0.a(glocalfileinfo.o): In function `lookup_uid_data':
(.text+0x1f6a): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libdbus-1.a(dbus-sysdeps-unix.o): In function `_dbus_connect_tcp_socket':
dbus-sysdeps-unix.c:(.text._dbus_connect_tcp_socket+0xb2): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
a.s/libxml2.a(nanohttp.o): In function `xmlNanoHTTPConnectHost':
(.text+0x104d): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Rygel seems to be well compiled, but once you try to run the resulting
executable it gives a segmentation fault. Using valgrind you can see it
jumps to a wrong memory position:

==3122== 
==3122== Jump to the invalid address stated on the next line
==3122==    at 0x0: ???
==3122==    by 0x44C6E47: ??? (in /lib/libpthread-2.11.1.so)
==3122==    by 0x84C2ABD: call_init (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84C2C6C: _dl_init (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A279A: dl_open_worker (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A0CB9: _dl_catch_error (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A200C: _dl_open (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84714D7: dlopen_doit (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A0CB9: _dl_catch_error (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x8471780: _dlerror_run (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x8471444: __dlopen (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x833E1BE: dlopen (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==3122== 
==3122== 
==3122== Process terminating with default action of signal 11 (SIGSEGV)
==3122==  Bad permissions for mapped region at address 0x0
==3122==    at 0x0: ???
==3122==    by 0x44C6E47: ??? (in /lib/libpthread-2.11.1.so)
==3122==    by 0x84C2ABD: call_init (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84C2C6C: _dl_init (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A279A: dl_open_worker (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A0CB9: _dl_catch_error (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A200C: _dl_open (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84714D7: dlopen_doit (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x84A0CB9: _dl_catch_error (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x8471780: _dlerror_run (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x8471444: __dlopen (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122==    by 0x833E1BE: dlopen (in /home/danips/Escritorio/rygel_0_8_3/src/rygel/test)
==3122== 
==3122== HEAP SUMMARY:
==3122==     in use at exit: 0 bytes in 0 blocks
==3122==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==3122== 
==3122== All heap blocks were freed -- no leaks are possible
==3122== 
==3122== For counts of detected and suppressed errors, rerun with: -v
==3122== Use --track-origins=yes to see where uninitialised values come from
==3122== ERROR SUMMARY: 87830 errors from 707 contexts (suppressed: 0 from 0)
Violación de segmento (Segmentation fault in Spanish)

Can anybody tell me if I wont waste my time trying to port Rygel to
Android using the NDK?

Thanks in advance,
Daniel F.P.S.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]