Bug 196712

Summary: O=/objdir builds fail for out-of-tree builds with 2.6.9-39.4
Product: Red Hat Enterprise Linux 4 Reporter: Kimball Murray <kmurray>
Component: kernelAssignee: Doug Ledford <dledford>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: jbaron, jturner
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2006-0575 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-10 23:37:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 181411    
Attachments:
Description Flags
Fix patch for Makefile problem none

Description Kimball Murray 2006-06-26 17:07:37 UTC
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:
100%

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:

/usr/src/redhat.old/BUILD/linux-2.6.9-39.4EL/drivers/infiniband/core/index.c:36:25:
> 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 18:17:44 UTC
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 18:01:39 UTC
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 15:38:56 UTC
Verified based on existing rhts results. s390x fails but that failure is due to
BZ 197743.

Comment 10 Red Hat Bugzilla 2006-08-10 23:37:16 UTC
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.

http://rhn.redhat.com/errata/RHSA-2006-0575.html