我正在使用我的工具链为 ARM 编译 gst-plugins-bad。我编译了构建它所需的所有内容,包括 gstreamer、libmms 等...并将与 pkg-config 相关的标头、库和文件放入我的 sysroot 中。
当我配置 everyrhin 似乎没问题,但尝试编译结果为:
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
它似乎正在尝试链接到我的桌面 libxml2。为什么它没有链接到我的工具链中包含所有符号的工具链?
你的configure脚本支持autoconf交叉编译吗? 在configure.in中,调用AC_PROG_CC后shell变量cross_compiling的值是多少?
如果设置为 no,那么 makefile 是否设置为使用交叉编译器?
要设置这些,您可以在手册中覆盖它们或使用环境变量,例如 下面的例子
导出 CC=arch-gcc 导出 CXX=arch-c++ 导出 arch-ld 导出 AR=arch-ar 导出 AS=arch-as 导出 NM=arch-nm 导出STRIP=拱形条
如果设置为 yes,则检查 makefile 中专门用于 libxml 的包含路径。
在 ARM 上编译 gst-plugins-bad 的另一个可能的资源是以下指南
您确定您的工具链有 libxml2 吗?或者更确切地说,你的系统根目录。
您可能需要导出 PKG_CONFIG,因此当您运行“pkg-config --libs libxml-2.0”时,您将获得正确的路径。另外,您可以检查生成的 Makefile 以查看使用的真正标志是什么,或者使用详细选项进行构建。
GStreamer 的构建内容也可能因交叉编译而被破坏,这是我使用 scrapbox 2 的原因之一;它使交叉编译变得透明。