【发布时间】:2023-03-20 19:50:02
【问题描述】:
... 13. repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b fido
- 回购同步
检查这些特定的提交
- cd /arm/fsl-community-bsp-fido/sources/meta-fsl-arm/
- git checkout master
- git 获取
- git checkout 663a838d38dd9124805771637232df0af01efd7c
- cd /arm/fsl-community-bsp-fido/sources/meta-fsl-arm-extra/
- git checkout master
- git fetch ch
- git 获取
- git checkout 12cc66a9b8c3788309cf0a72c001f27abc299271
- cd /arm/fsl-community-bsp-fido/sources/poky/
- git checkout master
- git 获取
- git checkout 5a51fb28dbdfcae8ceb503a5290532dd38aeb09f
- 源设置-环境魔杖
已更改 MACHINE='wandboard'
- vi conf/local.conf
开始构建工具链
- bitbake 元工具链
运行脚本,即在构建步骤 #30 之后生成
- source tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.8+snapshot.sh
- ./tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.8+snapshot.sh
- 源环境-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
使用创建的绝对路径工具链进行交叉编译
@debian:~$ /opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc 你好.c hello.c:1:19:致命错误:stdio.h:没有这样的文件或目录 编译终止。
使用已创建的工具链和环境集进行交叉编译
@debian:~$ arm-poky-linux-gnueabi-gcc hello.c hello.c:1:19:致命错误:stdio.h:没有这样的文件或目录 编译终止。
使用创建的工具链进行交叉编译并设置环境并显式提供包含路径
@debian:~$ arm-poky-linux-gnueabi-gcc -I /opt/poky/1.8+snapshot/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/你好.c 在 /opt/poky/1.8+snapshot/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/features.h:389:0 包含的文件中, 来自/opt/poky/1.8+snapshot/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/stdio.h:27, 来自 hello.c:1: /opt/poky/1.8+snapshot/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/gnu/stubs.h:7:29:致命错误:gnu/stubs-soft.h:没有文件或目录 编译终止。
使用 -v 选项进行交叉编译 @debian:~$ arm-poky-linux-gnueabi-gcc -v hello.c 使用内置规范。 COLLECT_GCC=arm-poky-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/lto-wrapper 目标:arm-poky-linux-gnueabi 配置为:/arm/fsl-community-bsp-fido/build-sabre/tmp/work-shared/gcc-5.2.0-r0/gcc-5.2.0/configure --build=x86_64-linux --host= x86_64-pokysdk-linux --target=arm-poky-linux-gnueabi --prefix=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/poky/1.8+snapshot /sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --sbindir=/opt/poky /1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --libexecdir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/arm -poky-linux-gnueabi --datadir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux /etc --sharedstatedir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/var --libdir= /opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi --inc ludedir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/include --infodir= /opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/man -- disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/arm/fsl-community-bsp-fido/build-sabre/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with- gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu -- enable-libstdcxx-pch --program-prefix=arm-poky-linux-gnueabi- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap -- disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=发布 --enable-cheaders=c_global --without-isl --with-gxx-include-dir= /not/exist/usr/include/c++/5.2.0 --with-build-time-tools=/arm/fsl-community-bsp-fido/build-sabre/tmp/sysroots/x86_64-linux /usr/arm-poky-linux-gnueabi/bin --with-sysroot=/not/exist --with-build-sysroot=/arm/fsl-community-bsp-fido/build- sabre/tmp/sysroots/imx6qsabresd --enable-poison-system-directories --with-mpfr=/arm/fsl-community-bsp-fido/build-sabre/tmp/sysroots/x86_64-nativesdk-pokysdk-linux -- with-mpc=/arm/fsl-community-bsp-fido/build-sabre/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --enable-nls --with-arch=armv7-a 线程模型:posix gcc 版本 5.2.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-march=armv7-a' '-mtls-dialect=gnu' /opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/cc1 -quiet -v 你好。 c -quiet -dumpbase hello.c -march=armv7-a -mtls-dialect=gnu -auxbase hello -version -o /tmp/ccqXSLVK.s GNU C11 (GCC) 版本 5.2.0 (arm-poky-linux-gnueabi) 由 GNU C 版本 5.2.0、GMP 版本 6.0.0、MPFR 版本 3.1.3、MPC 版本 1.0.3 编译 GGC 启发式:--param ggc-min-expand=100 --param ggc-min-heapsize=131072 忽略不存在的目录“/not/exist/usr/lib/gcc/arm-poky-linux-gnueabi/5.2.0/include” 忽略不存在的目录“/not/exist/usr/local/include” 忽略不存在的目录“/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/../ ../../../../arm-poky-linux-gnueabi/include" 忽略不存在的目录“/not/exist/usr/include”
包括“...”搜索从这里开始:
include <...> 搜索从这里开始:
/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/include /opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/include-fixed 搜索列表结束。 GNU C11 (GCC) 版本 5.2.0 (arm-poky-linux-gnueabi) 由 GNU C 版本 5.2.0、GMP 版本 6.0.0、MPFR 版本 3.1.3、MPC 版本 1.0.3 编译 GGC 启发式:--param ggc-min-expand=100 --param ggc-min-heapsize=131072 编译器可执行校验和:4d79907806e372d157adce3e5c786751 hello.c:1:19:致命错误:stdio.h:没有这样的文件或目录
我需要一些帮助来使用这里创建的工具链来编译一个简单的 hello world。或者我错过了什么。
即使我不确定为什么这些标志会这样设置:
--with-gxx-include-dir=/not/exist/usr/include/c++/5.2.0
--with-sysroot=/not/exist
【问题讨论】:
标签: c compilation toolchain yocto