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
0000058 [BusyBox] Other tweak always 01-24-05 14:04 01-26-06 02:09
Reporter k1mgy View Status public  
Assigned To BusyBox
Priority normal Resolution no change required  
Status closed   Product Version 1.00
Summary 0000058: Compiling ash.c with DEBUG defined generates link error
Description ash.c has an accomodation to allow a debug output so that issues can be investigated. I'm experiencing some frustration with this build - a single carraige return line feed sent via any telnet session (either microsoft's telnet terminal or via putty) results in what appears to be an extra return or linefeed or both. To login, sending a keyboard-generated chr 010 works, but this is not a reasonable solution.

Therefore I want to debug ash to see what's happening.

ash.c allows you to define DEBUG=1 (or DEBUG=2) at the top of the source (or via the makefile). This then establishes the code necessary to provide a debug output.

ash.c contians the following:

#ifdef DEBUG
const char *bb_applet_name = "debug stuff usage";
int main(int argc, char **argv)
{
    return ash_main(argc, argv);
}
#endif

So with DEBUG defined, the following error is generated during compile:


/home/dev/axis/devboard_82/apps/busybox/shell/ash.c:64:1: warning: "_GNU_SOURCE" redefined
/home/dev/axis/devboard_82/apps/busybox/shell/ash.c:1:1: warning: this is the location of the previous definition
/home/dev/axis/devboard_82/apps/busybox/shell/ash.c:11263: warning: `showtree' defined but not used
/home/dev/axis/devboard_82/apps/busybox/shell/ash.c:11469: warning: `trputc' defined but not used


And this is the error during the link phase:

busybox/shell/shell.a(ash.o): warning: definition of `bb_applet_name' overriding common
busybox/applets/applets.a(busybox.o): warning: common is here
busybox/shell/shell.a(ash.o): In function `main':
ash.o(.text+0xa82a): multiple definition of `main'
busybox/applets/applets.a(busybox.o)(.text+0x0): first defined here
/usr/local/cris/lib/gcc-lib/cris-axis-linux-gnu/3.2.1/../../../../cris-axis-linux-gnu/bin/ld: Warning: size of symbol `main' changed from 94 to 6 in busybox/shell/shell.a(ash.o)
collect2: ld returned 1 exit status
make: *** [busybox] Error 1

Additional Information
Attached Files

- Relationships

- Notes
(0000554)
vodz
09-19-05 05:03

DEBUG ash compiled snadalone only as

$ cd shell
$ cc -DDEBUG -I../include ash.c cmdedit.o ../libbb/libbb.a

Its works
 

- Issue History
Date Modified Username Field Change
01-24-05 14:04 k1mgy New Issue
03-16-05 12:27 andersen Assigned To andersen => BusyBox
09-19-05 05:03 vodz Note Added: 0000554
01-26-06 02:09 vodz Status assigned => closed
01-26-06 02:09 vodz Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker