Bug 491775 - building of kernel-devel on i386 doesn't include asm-x86_64/stacktrace.h
building of kernel-devel on i386 doesn't include asm-x86_64/stacktrace.h
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
x86_64 Linux
low Severity high
: rc
: ---
Assigned To: Don Zickus
Red Hat Kernel QE team
Depends On:
  Show dependency treegraph
Reported: 2009-03-23 20:15 EDT by Brian J. Murrell
Modified: 2009-09-02 04:56 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 04:56:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
copy asm-x86_64 to i686-devel package (676 bytes, patch)
2009-04-02 09:43 EDT, Don Zickus
no flags Details | Diff
patch against a proper spec file is probably easier to deal with (565 bytes, patch)
2009-04-02 09:47 EDT, Don Zickus
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1243 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.4 kernel security and bug fix update 2009-09-01 04:53:34 EDT

  None (edit)
Description Brian J. Murrell 2009-03-23 20:15:33 EDT
Description of problem:

When building the kernel-devel package on/for i{}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):


How reproducible:


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-23 20:23:30 EDT
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 09:43:05 EDT
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 09:47:41 EDT
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 10:12:31 EDT
(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
Comment 6 RHEL Product and Program Management 2009-05-18 23:49:23 EDT
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
Comment 7 Don Zickus 2009-05-21 11:36:39 EDT
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 14:27:47 EDT
~~ 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 04:56:53 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 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.


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