gstreamer on android build help

Lee Matthews lma at spaceapplications.com
Wed Apr 30 02:10:34 PDT 2014


Thanks Sebastian,

I've added the libraries to Eclipse and got rid of most of the errors, but now I have :

/home/lma/Development/buildroot-2014.02/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/crt1.o: In function `_start':
:(.text+0x30): undefined reference to `__libc_csu_fini'
:(.text+0x38): undefined reference to `__libc_csu_init'
collect2: error: ld returned 1 exit status
make: *** [mobipv-audio-sink-opensles-arm] Error 1

I have specified the location of the dynamic linker library to the linker using "-dynamic-linker /home/lma/Development/buildroot-2014.02/output/target/lib/ld-linux.so.3"

But I still get the error. Do you have any ideas ?

Thanks
Lee

----- Original Message -----
From: "Sebastian Dröge" <sebastian at centricular.com>
To: "Discussion of the development of and with GStreamer" <gstreamer-devel at lists.freedesktop.org>
Sent: Wednesday, 30 April, 2014 9:02:14 AM
Subject: Re: gstreamer on android build help

On Di, 2014-04-29 at 13:56 +0200, Lee Matthews wrote:
> [...]
> I've tried using the NDK method by taking the android tutorial-1.c code, adding the plugins that I wish to use in my final application. 
> The shared library builds ok, but when I try linking it to my application in eclipse, I get the following errors :
> 
> ---
> 
> /home/lma/Development/buildroot-2014.02/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.7.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libc.so, needed by /home/lma/tmp/libs/armeabi/libgstreamer_android.so, not found (try using -rpath or -rpath-link)
> /home/lma/Development/buildroot-2014.02/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.7.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libOpenSLES.so, needed by /home/lma/tmp/libs/armeabi/libgstreamer_android.so, not found (try using -rpath or -rpath-link)
> /home/lma/Development/buildroot-2014.02/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.7.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: liblog.so, needed by /home/lma/tmp/libs/armeabi/libgstreamer_android.so, not found (try using -rpath or -rpath-link)
> ./src/audio-sink-opensles.o: In function `main':
> [...]

You have to tell Eclipse that it needs to link all the required Android
libraries that the linker complains about now to your application.

> ---
> 
> I've also tried building the gstreamer library using libtool. I downloaded the binary files : gstreamer-1.0-android-arm-1.2.4.1-debug.zip
> 
> I then tried linking the static libraries to produce one static library that I could link with my code in eclipse.
> 
> libtool --tag=CC --mode=link arm-none-linux-gnueabi-gcc -static -o libgstreamer.a libgstcoreelements.a libgstopensles.a libgstaudioconvert.a libgstogg.a libgstopus.a libgstudp.a
> 
> If I run readelf afterwards I get :

This not how you build a static library from multiple other static
libraries. If you run ndk-build with LIBTOOL_DEBUG=1 you will see all
the commandlines that it runs to build a static library.

Also readelf only works on ELF shared libraries IIRC.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list