Bug 11475 - linux/bounds.h erased on make clean
Summary: linux/bounds.h erased on make clean
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Sam Ravnborg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-01 08:43 UTC by Mike Isely
Modified: 2011-05-19 19:57 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.26.3
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Mike Isely 2008-09-01 08:43:46 UTC
Latest working kernel version: 2.6.25.x
Earliest failing kernel version: 2.6.26.3 (probably also 2.6.26.1+2)
Distribution: vanilla kernel
Hardware Environment: n/a
Software Environment: n/a
Problem Description:

When building a kernel with which later out-of-tree modules can be built against, one normally builds the kernel and then runs a "make clean" on the results.  What is left is stripped down but enough to build modules against.  But in 2.6.26.3 this fails because linux/bounds.h is missing (the header is encountered is for example the external module tries to include linux/slab.h).  This bounds.h header is generated by the build process but make clean is erasing it.  It is worth noting that the top-level Makefile has this comment:

# clean - Delete most, but leave enough to build external modules
#

What's happening now violates that principle, i.e. "make clean" is blowing away linux/bounds.h, breaking the ability to later on build external modules.  I've also verified that manually restoring this one missing file also restores the ability to build external modules.

Steps to reproduce:

1. Build the kernel in your usual way.
2. Note the existence of linux/bounds.h - save it somewhere out-of-tree for the moment.
3. Run "make clean"
4. Note that linux/bounds.h is missing.
5. Try to build an external module.  Odds are it will fail due to this missing header.
6. Manually restore linux/bounds.h from your saved copy.
7. Try to build the external module again.  This time it will work.
Comment 1 Mike Isely 2008-09-01 10:26:42 UTC
Just confirmed the same problem is in vanilla (from kernel.org) kernel 2.6.26

  -Mike
Comment 2 Gaurav 2008-09-06 16:05:27 UTC
Yes the problems exists in 2.6.26.
Its a bug in the makefile.

- gaurav
Comment 3 Arseny Solokha 2008-09-17 00:52:13 UTC
Me too.
Comment 4 Darren Hart 2011-04-25 17:10:33 UTC
I believe this is fixed in:

7d3cc8b6d899e53222c22a78d98bb53a695f7962
Don't clean bounds.h and asm-offsets.h

include/generated/bounds.h remains after a make clean for me on today's master. Suggest we close.
Comment 5 Sam Ravnborg 2011-05-19 19:57:49 UTC
Fixed in 7d3cc8b6d899e53222c22a78d98bb53a695f7962 - closed

Note You need to log in before you can comment on or make changes to this bug.