简体   繁体   中英

Error while compiling library for ARM platform

I'm using my toolchain to compile gst-plugins-bad for ARM. I compiled everything that should be needed to build it, including gstreamer, libmms etc... and placed in my sysroot both the headers, the libraries and files related to pkg-config.

When I configure everyrhing seems ok, but trying to compile results in:

luca@luca-work-laptop:~/gstreamer/gst-plugins-bad-0.10.21$ make
make  all-recursive
make[1]: Entering directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21'
Making all in gst-libs
make[2]: Entering directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs'
Making all in gst
make[3]: Entering directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst'
Making all in interfaces
make[4]: Entering directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/interfaces'
make  all-am
make[5]: Entering directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/interfaces'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/interfaces'
make[4]: Leaving directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/interfaces'
Making all in signalprocessor
make[4]: Entering directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/signalprocessor'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/signalprocessor'
Making all in video
make[4]: Entering directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/video'
  CC     libgstbasevideo_0.10_la-gstbasevideoutils.lo
  CC     libgstbasevideo_0.10_la-gstbasevideocodec.lo
  CC     libgstbasevideo_0.10_la-gstbasevideodecoder.lo
  CC     libgstbasevideo_0.10_la-gstbasevideoencoder.lo
  CC     libgstbasevideo_0.10_la-gstbasevideoparse.lo
  CCLD   libgstbasevideo-0.10.la
libtool: link: warning: library `/home/luca/.../arm-2010q1_vsync/arm-none-linux-gnueabi/libc/usr/lib/libgstbase-0.10.la' was moved.
libtool: link: warning: library `/home/luca/.../arm-2010q1_vsync/arm-none-linux-gnueabi/libc/usr/lib/libgstreamer-0.10.la' was moved.
libtool: link: warning: library `/home/luca/.../arm-2010q1_vsync/arm-none-linux-gnueabi/libc/usr/lib/libgobject-2.0.la' was moved.
libtool: link: warning: library `/home/luca/.../arm-2010q1_vsync/arm-none-linux-gnueabi/libc/usr/lib/libgmodule-2.0.la' was moved.
libtool: link: warning: library `/home/luca/.../arm-2010q1_vsync/arm-none-linux-gnueabi/libc/usr/lib/libgthread-2.0.la' was moved.
libtool: link: warning: library `/home/luca/.../arm-2010q1_vsync/arm-none-linux-gnueabi/libc/usr/lib/libglib-2.0.la' was moved.
libtool: link: warning: library `/home/luca/.../arm-2010q1_vsync/arm-none-linux-gnueabi/libc/usr/lib/libgstvideo-0.10.la' was moved.
/usr/lib/libxml2.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[4]: *** [libgstbasevideo-0.10.la] Error 1
make[4]: Leaving directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst/video'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs/gst'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21/gst-libs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/luca/gstreamer/gst-plugins-bad-0.10.21'
make: *** [all] Error 2

It seems it is trying to link against my desktop libxml2. Why isn't it linking against the one I have in my toolchain which has all the symbols?

Are you sure your toolchain has libxml2? Or rather, your sysroot.

You might need to export PKG_CONFIG, so when you run 'pkg-config --libs libxml-2.0' you get the right path. Also, you can check the resulting Makefile to see what are the real flags used, or build with the verbose option on.

It's also possible that GStreamer's build stuff is broken for cross-compilation, which is one of the reasons I use scratchbox 2; it makes cross-compilation transparent.

Does your configure script support autoconf cross-compilation ? In the configure.in , what is the value of the shell variable cross_compiling after calling AC_PROG_CC ?

If it is set to no, then is the makefile set to use your cross compiler ?

To set these you can either override them in the manual or use environment variables like the example below

export CC=arch-gcc export CXX=arch-c++ export arch-ld export AR=arch-ar export AS=arch-as export NM=arch-nm export STRIP=arch-strip

If it is set to yes, then check the include path specifically for libxml in the makefile.

Another possible resource for compiling gst-plugins-bad on ARM is the following guide

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM