Bug 196712 - O=/objdir builds fail for out-of-tree builds with 2.6.9-39.4
O=/objdir builds fail for out-of-tree builds with 2.6.9-39.4
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Doug Ledford
Brian Brock
: Regression
Depends On:
Blocks: 181411
  Show dependency treegraph
Reported: 2006-06-26 13:07 EDT by Kimball Murray
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2006-0575
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-10 19:37:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix patch for Makefile problem (489 bytes, patch)
2006-07-05 14:17 EDT, Doug Ledford
no flags Details | Diff

  None (edit)
Description Kimball Murray 2006-06-26 13:07:37 EDT
Description of problem:
Appears the latest changes to the infinband drivers introduce a build problem
for those who like to build kernel objects outside of the source directory
(using make O=/objdir).

Version-Release number of selected component (if applicable):
RHEL4, kernel 2.6.9-39.4

How reproducible:

Steps to Reproduce:
1. Install kernel SRPM (rpm -i kernel-2.6.9-39.4.EL.src.rpm)
2. cd /usr/src/redhat/SPECS
3. rpmbuild --target=i686 -bp kernel-2.6.spec (or as appropriate)
4. mkdir /objdir
5. cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
6. cp configs/kernel-2.6.9-i686-smp.config (or as appropriate) /objdir/.config
7. make O=/objdir oldconfig
8. make O=/objdir

The build will then commence, but will fail with this message:

> linux/index.h: No such file or directory
Actual results:
Build failure

Expected results:
Build success

Additional info:
If the build is done in-tree (without the O= build flag), the build will
succeed.  This behaves much like the build problem introduced with the lpfc
driver import a short while ago.
Comment 4 Doug Ledford 2006-07-05 14:17:44 EDT
Created attachment 131952 [details]
Fix patch for Makefile problem

This patch should solve the problem.  When building with a separate module
directory tree, the current directory (and therefore relative paths) are in the
object directory tree, not the source tree.  In order to make standard includes
work in that case, the KBUILD_SRC define is set and the srctree variable points
to the toplevel src directory.	We add an include that specifies
$(srctree)/<normal include path> into the include list and then our includes
are found like normal.
Comment 7 Jason Baron 2006-07-07 14:01:39 EDT
committed in stream U4 build 40.1. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/
Comment 8 Mike Gahagan 2006-07-14 11:38:56 EDT
Verified based on existing rhts results. s390x fails but that failure is due to
BZ 197743.
Comment 10 Red Hat Bugzilla 2006-08-10 19:37:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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