本文介绍了Yocto Bitbake Glibc构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试构建Yocto映像,但是在编译glibc时构建失败.
I'm trying to build a Yocto image but the build fails when compiling glibc.
如果我只是跑步
bitbake glibc -c compile
出现如下编译错误:
/usr/src/debug/glibc/2.27-r0/git/nptl/pthread_atfork.c:51: undefined reference to `__dso_handle'
| /media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi.gcc-cross-initial-arm/../../libexec/arm-poky-linux-gnueabi.gcc-cross-initial-arm/gcc/arm-poky-linux-gnueabi/7.3.0/ld: /media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/build-arm-poky-linux-gnueabi/rt/librt.so: hidden symbol `__dso_handle' isn't defined
| /media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi.gcc-cross-initial-arm/../../libexec/arm-poky-linux-gnueabi.gcc-cross-initial-arm/gcc/arm-poky-linux-gnueabi/7.3.0/ld: final link failed: Bad value
| collect2: error: ld returned 1 exit status
| ../Makerules:599: recipe for target '/media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/build-arm-poky-linux-gnueabi/rt/librt.so' failed
| make[2]: *** [/media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/build-arm-poky-linux-gnueabi/rt/librt.so] Error 1
| make[2]: Leaving directory '/media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/git/rt'
| Makefile:235: recipe for target 'rt/others' failed
| make[1]: *** [rt/others] Error 2
| make[1]: Leaving directory '/media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/git'
| Makefile:9: recipe for target 'all' failed
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/build-microchip/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/glibc/2.27-r0/temp/log.do_compile.31096)
ERROR: Task (/media/g/01D476BE2E4F26B0/AT91/SAMA5D27_SOM1/yocto/poky/meta/recipes-core/glibc/glibc_2.27.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 227 tasks of which 226 didn't need to be rerun and 1 failed.
glibc库显然非常重要,那么如何解决编译错误?
The glibc library is obviously very important so how can I resolved the compilation error?
推荐答案
获取软件包.
MACHINE=at91sam9rlek bitbake glibc
清洁
MACHINE=at91sam9rlek bitbake -c clean glibc
编译配方
MACHINE=at91sam9rlek bitbake -f -c compile glibc
您还可以指定 MACHINE
定义.如我所见,您使用了 meta-atmel
.您可以根据自己的董事会设置 MACHINE
定义.
You can also specify the MACHINE
definition. As I see, you use meta-atmel
. You can set the MACHINE
definition to according to your board.
注意:请确保您的 meta-atmel
版本与开放式和yocto poky版本匹配.这可能是根本原因.请分享结果.
Note: Be sure that your meta-atmel
version matches with open-embedded and yocto poky version. It can be the root cause. Please, share the results.
这篇关于Yocto Bitbake Glibc构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!