Bug 182032 - rpmbuild --rebuild and command line build result in two different kernels
Summary: rpmbuild --rebuild and command line build result in two different kernels
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 5
Hardware: ia64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: fedora-ia64
TreeView+ depends on / blocked
 
Reported: 2006-02-19 15:34 UTC by Prarit Bhargava
Modified: 2015-01-04 22:25 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-04-26 14:21:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Prarit Bhargava 2006-02-19 15:34:17 UTC
Description of problem:

A kernel build on the command line with

rpmbuild -bp kernel*.src.rpm
make nonint_config
make include/linux/version.h
make compressed
make modules
make modules_install
make install

OR

rpmbuild -bp kernel*.src.rpm
make nonint_config
make include/linux/version.h
make bzImage
make modules
make modules_install
make install

does not result in the same executable binaries as 

rpmbuild --rebuild kernel*.src.rpm
rpm -ivh kernel*.ia64.rpm

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

Latest rawhide/fedora pulls.

How reproducible: 100%

Steps to Reproduce:

1. See comments above.
  
Actual results:

If I boot the kernel from the rpmbuild --rebuild I see many "unaligned access"
messages throughout the boot (these are caused by the cpu being presented an
address that hasn't been aligned to 64-bit boundary.  A trap is generated and
the unaligned access message is sent to the console from a handler).

However, if I boot with a kernel that has been built on the command line using
either of the methods above I do not see these warning messages ... which 
means that I cannot reliably reproduce a binary generated by the build system
without executing an rpmbuild --rebuild.

Expected results:

The binaries should be the same*.

* Okay, yes, they will be "different" due to different dates on the build that
the module and built-in signing works. But they should execute the same way.

Additional info:

1.  I've done a diff between the output of a command line build versus rpmbuild
--rebuild (in order to look for obvious CFLAGS differences, etc.).  I haven't
seen anything obvious.

Oddly, the order of the files that are compiled is different...

2.  A possible next step is to do a diff between objdumps to see what is really 
different.  

3.  The SHA1 compression routines are generating the "unaligned access" messages
-- I tracked this down quickly.

4.  I've built on the latest rawhide drops on a RHEL4 and a Fedora Core system
in order to see if that was the issue -- that does not appear to be the case.

5.  I verified that the "unaligned access" trap is being generated in the
command line kernels.  So it isn't a problem with that.

6.  I've only noticed this on ia64 because the "unaligned access" messages
disappeared from the console.  I have not attempted to see if there are any
discrepancies on other arch's.

Comment 1 Dave Jones 2006-02-19 20:28:26 UTC
rpmbuild is voodoo to me, maybe Paul knows. (Cc'd)


Comment 2 Paul Nasrat 2006-03-01 20:22:03 UTC
Prarit - have you tried running the rpmbuild post scripts (eg for stripping and
debuginfo) on the resultant image to see if they cause it.

Comment 3 Prarit Bhargava 2006-03-14 16:11:26 UTC
Paul, 
 
Added 
 
%define __strip /bin/true 
 
to the spec file.  Still see "unaligned access" messages. 
 
Also ran strip and debuginfo on a "self-built" kernel image.  Don't see 
"unaligned access" messages ... 
 
P. 

Comment 4 Paul Nasrat 2006-03-14 16:28:34 UTC
What exact steps did you take exactly?

rpm -E '%__debug_install_post'

   /usr/lib/rpm/find-debuginfo.sh /home/pauln/Development/rpm/BUILD/
rpm -E '%__arch_install_post'
rpm -E '%__os_install_post'
 /usr/lib/rpm/find-debuginfo.sh 
    /usr/lib/rpm/redhat/brp-compress
    /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
    /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
    /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
    /usr/lib/rpm/brp-python-bytecompile



Comment 5 Prarit Bhargava 2006-04-26 14:21:09 UTC
Jes' upstream patch that fixed the kernel name alignment fixed this issue.  
Since this will get sucked into Fedora there's no point in putting a patch
together ...

P.


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