[BusyBox] uClinux and busybox compilation error: toolchain's problem?

Shawn Jin shawnxjin at gmail.com
Thu Dec 9 22:49:01 UTC 2004


Hi Rob,

Sorry for the last email. I clicked wrong button.

Your way to dig into the details just inspired me to find the cause of
another problem I have when compiling busybox-1.0.0.

> arm-uclinux-gcc -Ibusybox-1.00/include -Ibusybox-1.00/include
> -Ibusybox-1.00/libbb -Wall -Wstrict-prototypes -Wshadow -Os
> -fstrict-aliasing -fomit-frame-pointer-D_GNU_SOURCE -DNDEBUG     -c -o
> busybox-1.00/libbb/syscalls.o
> busybox-1.00/libbb/syscalls.c
> busybox-1.00/libbb/syscalls.c: In function `sysfs':
> busybox-1.00/libbb/syscalls.c:34: error: `__NR_sysfs' undeclared
> (first use in this function)

__NR_sysfs is defined in <asm/unistd.h>, which is included in
<linux/unistd.h>. But surprisingly to find that it's NOT include in
<unistd.h> in the toolchain I use.

Adding <linux/unistd.h> to libbb/syscalls.c solved the problem.

-shawn.



More information about the busybox mailing list