Compiling busybox

Shaun Jackman
Tue Apr 5 18:18:00 GMT 2005


I recently compiled busybox for i386-linux using newlib 1.12.0 (CVS
2004-12-02). I ran into a few minor issues I'll list in one mail here:

sys/lock.h includes machine/weakalias.h but the latter is not installed.

symlink(2) is not defined in sys/unistd.h.

sys/signal.h does not define sighandler_t.

linking busybox gives...
/usr/bin/ld: warning: type and size of dynamic symbol
`_ctype_@@VERS_1.10' are not defined

My biggest trouble was with functions that weren't defined due to
being wrapped in a #ifndef _POSIX_SOURCE. Otherwise, it was relatively
painless! busybox now compiles quite cleanly with newlib for Linux. My
next step is to make busybox compile cleanly using newlib for arm-elf.


$ gcc -nostartfiles /usr/lib/newlib/crt0.o -Wl,-warn-common -o busybox
-Wl,--start-group applets/applets.a archival/archival.a
archival/libunarchive/libunarchive.a coreutils/coreutils.a
console-tools/console-tools.a debianutils/debianutils.a
editors/editors.a findutils/findutils.a init/init.a
miscutils/miscutils.a modutils/modutils.a networking/networking.a
networking/libiproute/libiproute.a networking/udhcp/udhcp.a
procps/procps.a loginutils/loginutils.a shell/shell.a
sysklogd/sysklogd.a util-linux/util-linux.a libpwdgrp/libpwdgrp.a
coreutils/libcoreutils/libcoreutils.a libbb/libbb.a -L/usr/lib/newlib
/usr/bin/ld: warning: type and size of dynamic symbol
`_ctype_@@VERS_1.10' are not defined

More information about the Newlib mailing list