[BusyBox 0000414]: Incorrect include ordering can lead to build failure
bugs at busybox.net
bugs at busybox.net
Tue Sep 6 21:50:15 UTC 2005
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=414
======================================================================
Reported By: des
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 414
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 09-06-2005 04:36 PDT
Last Modified: 09-06-2005 14:50 PDT
======================================================================
Summary: Incorrect include ordering can lead to build failure
Description:
Note: actual version is 1.01, which isn't listed in the "Product Version"
pull-down menu in the bug tracking system
busybox.h includes config.h before anything else.
config.h defines or undefines various CONFIG_FOO macros depending on which
parts of BusyBox are to be built.
Some of these macros conflict with similarly-named macros defined in
<linux/autoconf.h> which is pulled in indirectly by <limits.h> and / or
<sys/param.h> near the bottom of busybox.h.
This can lead to a build failure in applets.c. Let's say you want to
build busybox without the sysctl applet, so config.h contains #undef
CONFIG_SYSCTL.
applets.c includes busybox.h
busybox.h includes config.h -> #undef CONFIG_SYSCTL
busybox.h defines PROTOTYPES and includes applets.h
busybox.h includes <sys/param.h> -> #define CONFIG_SYSCTL 1
applets.c defines MAKE_USAGE and includes applets.h
applets.c undefines PROTOTYPES and MAKE_USAGE and includes applets.h to
generate the applets[] array
applets[] references an undeclared and undefined sysctl_main() -> BOOM
======================================================================
----------------------------------------------------------------------
des - 09-06-05 06:35
----------------------------------------------------------------------
This only occurs on systems running Linux 2.6.13, where <asm/param.h> pulls
in <linux/config.h> unconditionally. Older Linux systems are unaffected.
This is arguably a Linux issue, not a BusyBox issue...
----------------------------------------------------------------------
vapier - 09-06-05 14:50
----------------------------------------------------------------------
dupe of Bug 316
Issue History
Date Modified Username Field Change
======================================================================
09-06-05 04:36 des New Issue
09-06-05 04:36 des Status new => assigned
09-06-05 04:36 des Assigned To => BusyBox
09-06-05 04:36 des File Added: applets.diff
09-06-05 04:38 des Issue Monitored: des
09-06-05 06:35 des Note Added: 0000493
09-06-05 14:50 vapier Status assigned => closed
09-06-05 14:50 vapier Note Added: 0000494
======================================================================
More information about the busybox-cvs
mailing list