这里有一个奇怪的错误,试图在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。
有什么想法吗?非常感谢。
发布于 2014-01-04 01:28:14
为什么u-boot源代码树在/root/中?在执行make时,您是否以超级用户身份登录?您确定要将u-boot编译为root吗?因为你不需要这么做。
当我试图理解这里出了什么问题时,我认出了这里的一些行,http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-ARMCrossCompiler:GCC我希望你理解你执行的每一行,因为你需要一个接一个地执行它们才能让编译工作。关于wiki,请尝试这样做:
export CROSS_COMPILE=/path/to/the/directory/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-然后你就可以:
make ARCH=arm distclean
make ARCH=arm am335x_evm_config
make ARCH=arm 请注意,每次打开新控制台时都必须导出CROSS_COMPILE变量。
我希望我能帮到你。
发布于 2015-07-17 18:41:07
尝试使用所有依赖项安装libc6-dev。它为我解决了这个问题。
$ sudo apt-get install libc6-dev发布于 2015-08-14 05:16:12
sudo apt-get install libnewlib-arm-none-eabi
https://stackoverflow.com/questions/20905515
复制相似问题