u-boot交叉编译,致命错误:stdint.h

时间:2014-01-03 14:09:38

标签: u-boot

这里有一个奇怪的错误,试图在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目标。

有什么想法吗?非常感谢。

2 个答案:

答案 0 :(得分:0)

为什么你的u-boot源树在/ root /?执行make时是否以root用户身份登录? 你确定要以root身份编译u-boot吗?因为你不需要。

当我试图了解这里出了什么问题时,我在这里认识到了一些问题http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-ARMCrossCompiler:GCC 我希望你理解你执行的每一行,因为你需要一个接一个地执行它们才能使编译工作。 关于维基,请尝试这种方式:

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变量。

我希望我帮助过你。

答案 1 :(得分:0)

尝试使用所有依赖项安装libc6-dev。它解决了我的问题。

$ sudo apt-get install libc6-dev