gpt4 book ai didi

c++ - 为 ARM 平台编译库时出错

转载 作者:塔克拉玛干 更新时间:2023-11-03 08:00:07 25 4
gpt4 key购买 nike

我正在使用我的工具链为 ARM 编译 gst-plugins-bad。我编译了构建它所需的一切,包括 gstreamer、libmms 等...并将与 pkg-config 相关的 header 、库和文件放在我的 sysroot 中。

当我配置一切时似乎没问题,但尝试编译结果:

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=arch-strip

如果设置为yes,则检查makefile中专门针对libxml的include路径。

在 ARM 上编译 gst-plugins-bad 的另一个可能资源如下 guide

关于c++ - 为 ARM 平台编译库时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9604298/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com