u-boot cross compile, fatal error: stdint.h

1

There is a strange error here, trying to cross compile for ARM on Linux Mint. I used:

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.

I also have exported ARCH and CROSS_COMPILE but I compiled u_boot without last week on other machine without a problem Seems to be a cross compiler problem but it is the same Linaro un-tar-ed in some location.

Any idea? Thanks very much.

u-boot
asked on Stack Overflow Jan 3, 2014 by user1797147

3 Answers

0

Why is your u-boot source tree in /root/ ? Are you logged as root when executing make? Are you sure you want to compile u-boot as a root ? because you don't need to.

As I was trying to understand what is going wrong here, I recognized some lines here http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-ARMCrossCompiler:GCC I hope you understood each line you executed because you need to execute them one after the other to have the compilation working. Regarding the wiki, try this way :

export CROSS_COMPILE=/path/to/the/directory/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-

Then you can just :

make ARCH=arm distclean
make ARCH=arm am335x_evm_config
make ARCH=arm 

Note that you will have to export the CROSS_COMPILE variable each time you open a new console.

I hope I helped you.

answered on Stack Overflow Jan 3, 2014 by Cyril Fougeray
0

Try installing libc6-dev with all dependency. It solved the problem for me.

$ sudo apt-get install libc6-dev
answered on Stack Overflow Jul 17, 2015 by Rahul Chawre
0

sudo apt-get install libnewlib-arm-none-eabi

answered on Stack Overflow Aug 13, 2015 by phord

User contributions licensed under CC BY-SA 3.0