Moo*_*B S 5 plugins fpic gstreamer yocto
我正在通过yocto 1.6构建一个gst插件。我有32位和64位的linaro 4.9跨工具链。当我使用64位工具链构建插件时,它是成功的(我获得了插件.so文件),而如果我使用32位工具链构建相同的源,则会出现以下错误
/home/build-directory/tmp/sysroots/x86_64-linux/usr/libexec/cortexa8hf-vfp-neon-rdk-linux-gnueabi/gccgcc/arm-rdk-linux-gnueabi/4.9.4/ld: error: .libs/libgstpluginxxx_la-gstpluginxxx.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
Run Code Online (Sandbox Code Playgroud)
这里整个错误
./arm-rdk-linux-gnueabi-libtool --tag=CC --tag=disable-static --mode=link arm-rdk-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=/home/sysroots/path -pthread -I/home/sysroots/path/usr/include/gstreamer-1.0 -I/home/sysroots/path/usr/include/glib-2.0 -I/home/sysroots/path/usr/lib/glib-2.0/include -O2 -pipe -g -feliminate-unused-debug-types -fPIC -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o libgstpluginxxx.la -rpath /usr/lib/gstreamer-1.0 libgstpluginxxx_la-gstpluginxxx.lo -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
arm-rdk-linux-gnueabi-libtool: link: arm-rdk-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -enable-shared -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=/home/sysroots/path -shared -fPIC -DPIC .libs/libgstpluginxxx_la-gstpluginxxx.o /home/sysroots/path/usr/lib/libgstreamer-1.0.so -L/home/sysroots/path/usr/lib /home/sysroots/path/usr/lib/libgmodule-2.0.so -lm -ldl /home/sysroots/path/usr/lib/libgobject-2.0.so /home/sysroots/path/usr/lib/libffi.so /home/sysroots/path/usr/lib/libglib-2.0.so -lpthread -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/sysroots/path -pthread -O2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -pthread -Wl,-soname -Wl,libgstpluginxxx.so.0 -o .libs/libgstpluginxxx.so.0.0.0
/home/build-directory/tmp/sysroots/x86_64-linux/usr/libexec/cortexa8hf-vfp-neon-rdk-linux-gnueabi/gcc/arm-rdk-linux-gnueabi/4.9.4/ld: error: .libs/libgstpluginxxx_la-gstpluginxxx.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
Run Code Online (Sandbox Code Playgroud)
我很困惑,为什么尽管链接命令中提到了-fPIC,构建仍无法用-fPIC重新编译?我在Makefile和libtool脚本中的任何地方手动尝试了-fPIC选项,但没有使用:(
和
在不修改源文件和配方文件的情况下,它在32位工具链中成功,而在64位工具链中失败,并要求使用-fPIC选项进行重新编译
以下是构建机器信息。
BB_VERSION = "1.28.0"
BUILD_SYS = "i686-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
Run Code Online (Sandbox Code Playgroud)
这可能是黄金链接器中的错误。如同
https://sourceware.org/ml/binutils/2010-12/msg00473.html
看来您正在使用黄金链接器作为默认 ld。所以请通过
LDFLAGS += "-fuse-ld=bfd"
Run Code Online (Sandbox Code Playgroud)
在这个包的食谱中。看看是否有帮助。这将强制 GNU BFD 链接器用于此包。
| 归档时间: |
|
| 查看次数: |
1126 次 |
| 最近记录: |