BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000125 [BusyBox] Networking Support block always 02-25-05 22:31 02-11-08 10:19
Reporter frankteoth View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.00
Summary 0000125: Compile Busybox without MMU failed.
Description Compilation failed when building Busybox for Generic ARM (no MMU) target.
You need to disable "start-stop-daemon", "System Logging Utilities", and
"udhcp Server/Client" in order to compile successfully.

If rebuild buildroot for Generic ARM (with MMU), compiling Busybox will be successful and without this issue.
Additional Information buildroot-snapshot.tar.bz2 (20050225)
busybox-snapshot.tar.bz2 (20050225)
uClibc-snapshot.tar.bz2 (20050225)

binutils-2.15.94.0.2.2.tar.bz2
gcc-3.4.3.tar.bz2
linux-libc-headers-2.4.29.tar.bz2

# Generic Arm
# Little Endian
# (ARCH_HAS_MMU) [Y/n/?] (NEW) N
# (UCLIBC_MALLOC_DEBUGGING) [N/y/?] (NEW) N

/home/frank/projects/buildroot/build_arm/staging_dir/bin/arm-linux-uclibc-ar: creating /home/frank/projects/buildroot/build_arm/busybox/libbb/libbb.a
/home/frank/projects/buildroot/build_arm/staging_dir/bin/arm-linux-uclibc-gcc -s -Wl,-warn-common -o busybox -Wl,--start-group /home/frank/projects/buildroot/build_arm/busybox/applets/applets.a /home/frank/projects/buildroot/build_arm/busybox/archival/archival.a /home/frank/projects/buildroot/build_arm/busybox/archival/libunarchive/libunarchive.a /home/frank/projects/buildroot/build_arm/busybox/coreutils/coreutils.a /home/frank/projects/buildroot/build_arm/busybox/console-tools/console-tools.a /home/frank/projects/buildroot/build_arm/busybox/debianutils/debianutils.a /home/frank/projects/buildroot/build_arm/busybox/editors/editors.a /home/frank/projects/buildroot/build_arm/busybox/findutils/findutils.a /home/frank/projects/buildroot/build_arm/busybox/init/init.a /home/frank/projects/buildroot/build_arm/busybox/miscutils/miscutils.a /home/frank/projects/buildroot/build_arm/busybox/modutils/modutils.a /home/frank/projects/buildroot/build_arm/busybox/networking/networking.a /home/frank/projects/buildroot/build_arm/busybox/networking/libiproute/libiproute.a /home/frank/projects/buildroot/build_arm/busybox/networking/udhcp/udhcp.a /home/frank/projects/buildroot/build_arm/busybox/procps/procps.a /home/frank/projects/buildroot/build_arm/busybox/loginutils/loginutils.a /home/frank/projects/buildroot/build_arm/busybox/shell/shell.a /home/frank/projects/buildroot/build_arm/busybox/sysklogd/sysklogd.a /home/frank/projects/buildroot/build_arm/busybox/util-linux/util-linux.a /home/frank/projects/buildroot/build_arm/busybox/libpwdgrp/libpwdgrp.a /home/frank/projects/buildroot/build_arm/busybox/coreutils/libcoreutils/libcoreutils.a /home/frank/projects/buildroot/build_arm/busybox/libbb/libbb.a -lm -lcrypt -Wl,--end-group
/home/frank/projects/buildroot/build_arm/busybox/debianutils/debianutils.a(start_stop_daemon.o)(.text+0x5fc): In function `start_stop_daemon_main':
start_stop_daemon.c: undefined reference to `daemon'
/home/frank/projects/buildroot/build_arm/busybox/networking/udhcp/udhcp.a(common.o)(.text+0x30): In function `background':
common.c: undefined reference to `daemon'
/home/frank/projects/buildroot/build_arm/busybox/sysklogd/sysklogd.a(klogd.o)(.text+0xd4): In function `klogd_main':
klogd.c: undefined reference to `daemon'
/home/frank/projects/buildroot/build_arm/busybox/sysklogd/sysklogd.a(syslogd.o)(.text+0x5b4): In function `syslogd_main':
syslogd.c: undefined reference to `daemon'
collect2: ld returned 1 exit status
make[1]: *** [busybox] Error 1
make[1]: Leaving directory `/home/frank/projects/buildroot/build_arm/busybox'
make: *** [/home/frank/projects/buildroot/build_arm/busybox/busybox] Error 2
Attached Files  BUG-0000125.tar.bz2 [^] (6,665 bytes) 12-10-05 09:58
 patch_busybox_daemon [^] (5,837 bytes) 03-28-06 13:11

- Relationships

- Notes
(0000741)
landley
12-07-05 22:13

What version of uClibc are you building against, and could you post your .config to the mailing list?

Rob
 
(0000758)
frankteoth
12-10-05 10:02

Uses:
buildroot-20051209.tar.bz2
busybox-1.01.tar.bz2
uClibc-0.9.28.tar.bz2

binutils-2.16.1.tar.bz2
gcc-3.4.2.tar.bz2
linux-libc-headers-2.4.31.tar.bz2

.config for buildroot, busybox & uClibc are attached.
.config.BUGS & .config.GOOD for busybox are also attached.
Please refer to attachment: BUG-0000125.tar.bz2
 
(0000909)
landley
01-09-06 23:28

Your libc isn't providing daemonize(), and those things (quite understandably) want it. This is a toolchain issue, not a busybox issue.

man 3 daemonize
 
(0000912)
vapier
01-10-06 06:01

not really

would also say it's a toolchain/kernel problem that fork() isnt available on uClinux ?
 
(0001201)
jamie
03-28-06 13:23

It's fixed with the attached patch "patch_busybox_daemon",
for i386 and ARM uClinux.

Other architectures are easy to add, and I'll do so if someone asks
(but you can probably do it yourself).

Because uClinux kernel doesn't implement fork(), uClibc doesn't
implement daemon() on those targets. However daemon() can be
implemented using clone() and an assembly stub.

Only use this patch with supported MMUless uClinux targets.
It has the wrong behaviour otherwise.

It would be great if someone includes this patch in the Busybox
source tree and adds an Autoconf test to decide when to use it,
which is when there isn't a working fork().

Enjoy, --Jamie
 
(0001202)
vapier
03-28-06 16:25

that patch isnt acceptable, sorry
 
(0001412)
bernhardf
06-11-06 10:34

We will take care of this in bb_xdaemon for the BB_NOMMU case.

E.g.:
#if !BB_NOMMU /* normal case, we have fork */
#define bb_xdaemon(chd,clo,str) common_xdaemon(chd,clo)
#else
#define bb_xdaemon(chd,clo,str) vfork_daemon_rexec(chd,clo,str)
#endif

If by then we still have not exported argv and argc, we'll have to also pass these in -- for the case we end up calling vfork_daemon_rexec().
 
(0004064)
vda
02-11-08 10:19

Appears to be fixed in svn. start_stop_daemon works for me on NOMMU.
 

- Issue History
Date Modified Username Field Change
02-25-05 22:31 frankteoth New Issue
03-16-05 12:27 andersen Assigned To andersen => BusyBox
09-17-05 03:56 Dmitry Bazhenov Issue Monitored: Dmitry Bazhenov
12-07-05 22:13 landley Note Added: 0000741
12-07-05 22:13 landley Status assigned => feedback
12-10-05 08:40 frankteoth Issue Monitored: frankteoth
12-10-05 09:53 frankteoth Issue End Monitor: frankteoth
12-10-05 09:58 frankteoth File Added: BUG-0000125.tar.bz2
12-10-05 10:02 frankteoth Note Added: 0000758
01-09-06 23:28 landley Status feedback => closed
01-09-06 23:28 landley Note Added: 0000909
01-09-06 23:28 landley Resolution open => no change required
01-10-06 06:01 vapier Status closed => feedback
01-10-06 06:01 vapier Resolution no change required => reopened
01-10-06 06:01 vapier Note Added: 0000912
03-28-06 12:26 jamie Issue Monitored: jamie
03-28-06 13:11 jamie File Added: patch_busybox_daemon
03-28-06 13:23 jamie Note Added: 0001201
03-28-06 16:25 vapier Note Added: 0001202
06-11-06 10:34 bernhardf Note Added: 0001412
02-11-08 10:19 vda Status feedback => closed
02-11-08 10:19 vda Note Added: 0004064
02-11-08 10:19 vda Resolution reopened => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker