'Busybox compilation is failing with no include path in which to search for limits.h

I generated toolchain with Yocto for qemuarm, by running the following command: 'bitbake -c populate_sdk core-image-minimal' and installed on my build machine, Following are the commands i am executing for busybox to compile.

 . /opt/poky/3.1.14/environment-setup-armv7vet2hf-neon-poky-linux-gnueabi
 wget https://busybox.net/downloads/busybox-1.30.0.tar.bz2
 tar xvf busybox-1.30.0.tar.bz2
 make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-gcc defconfig
 make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- defconfig
 make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig
 make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- install

The compilation is failing with the below error:

  CC      applets/applets.o
In file included from /opt/poky/3.1.14/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/include-fixed/syslimits.h:7,
                 from /opt/poky/3.1.14/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/include-fixed/limits.h:34,
                 from include/platform.h:153,
                 from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
/opt/poky/3.1.14/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/include-fixed/limits.h:194:61: error: no include path in which to search for limits.h
  194 | #include_next <limits.h>  /* recurse down to the real one */
      |                                                             ^
In file included from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/platform.h:164:11: fatal error: byteswap.h: No such file or directory
  164 | # include <byteswap.h>
      |           ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:198: applets/applets.o] Error 1
make: *** [Makefile:372: applets_dir] Error 2

Can you please help me on this



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source