xCoder
xCoder

Reputation: 31

busybox compilation for arm : fatal error: byteswap.h: No such file or directory

Trying to build busybox for ARM architecture

Error Faced :

> In file included from include/libbb.h:13:0,
>                  from include/busybox.h:8,
>                  from applets/applets.c:9: include/platform.h:157:11: fatal error: byteswap.h: No such file or directory  # include
> <byteswap.h>
>            ^~~~~~~~~~~~ compilation terminated. scripts/Makefile.build:197: recipe for target 'applets/applets.o'
> failed make[1]: *** [applets/applets.o] Error 1 Makefile:372: recipe
> for target 'applets_dir' failed make: *** [applets_dir] Error 2

Host Machine : Ubuntu 16.04 LTS

Target Platform Arch : ARM

Tool Chain Used : gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2

Busybox : busybox-1.27.2.tar.bz2

Upvotes: 3

Views: 5740

Answers (2)

Sold Out
Sold Out

Reputation: 1428

little late, but this Q. seems to be still alive.

You probably want to use other toolchans:

gcc-arm-linux-gnueabi for SW floating point support, or gcc-arm-linux-gnueabihf for HW floating point support.

These are designed for cross compilation from Linux @ Intel HW to Linux @ ARM HW

Get them on UBUNTU:

sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabi
sudo apt-get install gcc-arm-linux-gnueabihf

Manually download tool chains: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Documentation: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain

Upvotes: 0

You are using a compiler that is configured to produce bare metal executables, i.e. ones that run on a system without an operating system, to compile a program that runs on Linux. That's not going to work, at least not without a lot of extra porting effort.

You should use a cross-compiler toolchain, with headers and libraries that support your target operating system.

Upvotes: 2

Related Questions