【发布时间】:2015-08-14 05:16:11
【问题描述】:
这里有一个奇怪的错误,试图在 Linux Mint 上交叉编译 ARM。我用过:
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_config
make ARCH=arm CROSS_COMPILE=${CC}
make[1]: Leaving directory `/root/bbb/u-boot/arch/arm/cpu/armv7'
make[1]: Entering directory `/root/bbb/u-boot/board/ti/am335x'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/bbb/u-boot/board/ti/am335x'
make -C tools all
make[1]: Entering directory `/root/bbb/u-boot/tools'
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include /root/bbb/u-boot/include/libfdt_env.h -idirafter /root/bbb/u-boot/include -idirafter /root/bbb/u-boot/include2 -idirafter /root/bbb/u-boot/include -I /root/bbb/u-boot/lib/libfdt -I /root/bbb/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0x80800000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -pedantic -c -o crc32.o /root/bbb/u-boot/lib/crc32.c
In file included from /root/bbb/u-boot/include/compiler.h:19:0,
from /root/bbb/u-boot/include/libfdt_env.h:12,
from <command-line>:0:
/usr/lib/gcc/i686-linux-gnu/4.8/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
# include_next <stdint.h>
^
compilation terminated.
我也导出了 ARCH 和 CROSS_COMPILE,但上周我在其他机器上编译 u_boot 时没有问题似乎是交叉编译器问题,但在某些位置它是相同的 Linaro un-tar-ed。
有什么想法吗?非常感谢。
【问题讨论】:
-
您导出 CC 了吗?您的命令有 CROSS_COMPILE=${CC},这将踩到以前的 CROSS_COMPILE 导出。
-
尝试打印CC看看。看到那行
/usr/lib/gcc/i686-linux-gnu/4.8/include/stdint.h:9:26,我认为您没有使用正确的编译器...?另外,我建议您编辑 .bashrc 文件(位于 ~/),这样您就不需要每次编译时都重新定义 CROSS_COMPILE 变量。
标签: u-boot