gstreamer on android build help
Sebastian Dröge
sebastian at centricular.com
Wed Apr 30 00:02:14 PDT 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140430/98c338b7/attachment.sig>
More information about the gstreamer-devel
mailing list