Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 491775

Summary: building of kernel-devel on i386 doesn't include asm-x86_64/stacktrace.h
Product: Red Hat Enterprise Linux 5 Reporter: Brian J. Murrell <brian.murrell>
Component: kernelAssignee: Don Zickus <dzickus>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: low    
Version: 5.3CC: brian, cward, dzickus, imatusov
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 08:56:53 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:
Attachments:
Description Flags
copy asm-x86_64 to i686-devel package
none
patch against a proper spec file is probably easier to deal with none

Description Brian J. Murrell 2009-03-24 00:15:33 UTC
Description of problem:

When building the kernel-devel package on/for i{3.4.5.6}86, the kernel SPEC file does not include asm-x86_64 headers.  However there are references to asm-x86_64 headers in the asm-i386 tree.

Version-Release number of selected component (if applicable):

2.6.18-128.1.1.el5

How reproducible:

Very.

Steps to Reproduce:
1. Build a kernel-devel package on i{3,4,5,6}86, or simply inspect with rpm -qvlp the resulting kernel-devel rpm.
2. Notice the lack of asm-x86_64 headers.
3. Look in the include/asm-i386/stacktrace.h header.
  
Actual results:

You will see:

#include <asm-x86_64/stacktrace.h>

Expected results:

Well, the above is expected, but include/asm-x86_64/stacktrace.h is not actually available in the kernel-devel for i{3,4,5,6}86 and therefore code which includes, via:

#include <asm/stacktrace.h>

on i{3,4,5,6}86 will end up failing to build with:

include/asm/stacktrace.h:1:35: error: asm-x86_64/stacktrace.h: No such file or directory

Comment 1 Brian J. Murrell 2009-03-24 00:23:30 UTC
Looking in include/asm-i386 it seems there are a few other instances of this problem:

i686/include/asm-i386/k8.h:#include <asm-x86_64/k8.h>
i686/include/asm-i386/pci-direct.h:#include "asm-x86_64/pci-direct.h"

That was just searching for asm-x86_64.  Maybe there are other cross-pollinations.

Comment 2 Don Zickus 2009-04-02 13:43:05 UTC
Created attachment 337814 [details]
copy asm-x86_64 to i686-devel package

Quickly looking at the spec file, the attached patch seems like the obvious solution for now.  Completely untested though.  I'll try to test it later on today or next week.

With the merging of i386 and x86_64, this problem doesn't exist any more upstream.

Comment 3 Don Zickus 2009-04-02 13:47:41 UTC
Created attachment 337815 [details]
patch against a proper spec file is probably easier to deal with


Oops, the original patch was against my git tree.  This new patch is easier to apply against a src.rpm.

Comment 4 Brian J. Murrell 2009-04-02 14:12:31 UTC
(In reply to comment #3)
> Created an attachment (id=337815) [details]
> patch against a proper spec file is probably easier to deal with

That patch should work.  It's essentially a superset of what I am using currently.  Mine was just a little more surgical:

Yeah, that should do the trick.  I was a little more surgical:

--- SPECS/kernel-2.6.spec.dist	2009-03-23 20:30:55.000000000 -0400
+++ SPECS/kernel-2.6.spec	2009-03-23 20:37:03.000000000 -0400
@@ -6961,6 +6961,10 @@
     cd include
     cp -a acpi config keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     cp -a `readlink asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+    if [ "$Arch" = "i386" ]; then
+      mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/asm-x86_64
+      cp -a asm-x86_64/{stacktrace,k8,pci-direct}.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/asm-x86_64
+    fi
     if [ "$Arch" = "x86_64" ]; then
       cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     fi

Comment 6 RHEL Program Management 2009-05-19 03:49:23 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 Don Zickus 2009-05-21 15:36:39 UTC
in kernel-2.6.18-150.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 9 Chris Ward 2009-07-03 18:27:47 UTC
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.

Comment 12 errata-xmlrpc 2009-09-02 08:56:53 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 therefore 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-2009-1243.html