Bug 4009 - [PATCH][SINGLE APPLET] libbb/appletlib.c:805: error: `ether' undeclared (first use in this function)
Summary: [PATCH][SINGLE APPLET] libbb/appletlib.c:805: error: `ether' undeclared (firs...
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.18.x
Hardware: All All
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-27 16:59 UTC by d33tah
Modified: 2011-09-16 12:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
build-log.txt build-log-V=1.txt config fix_singleapplet.patch (4.64 KB, application/gzip)
2011-07-27 16:59 UTC, d33tah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description d33tah 2011-07-27 16:59:42 UTC
Created attachment 3511 [details]
build-log.txt build-log-V=1.txt config fix_singleapplet.patch

I recently tried to build etherwake as single applet build and I noticed it's impossible due to a compiler error I put in the bug summary box. I did some research and noticed it's probably because the SINGLE_APPLET_MAIN macro contains a hyphen, which - for some reason - the compiler treats as the end of the macro value. I removed the hyphens in all occurrences of 'ether-wake' in the source code and busybox managed to build with this applet only.

I tested it on Debian Squeeze with both mips-linux-gcc 3.4.2 and native GCC 4.4.5. Further information available if needed. I attach a .tar.gz file containing build logs both with and without V=1 on, the .config file I used for testing purposes and my quick-and-dirty patch allowing to compile etherwake in single-applet mode. Note it can also affect other binaries with hyphens in its names, such as nbd-client, modprobe-small, modutils-24, add-remove-shell and split-include. The list might differ, I found these names using a linux command:

find | grep '\.c$' | sed  's/console-tools/consoletools/g' | sed 's/util-linux/utillinux/g' |   grep -