Bug 182032 - rpmbuild --rebuild and command line build result in two different kernels
rpmbuild --rebuild and command line build result in two different kernels
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Dave Jones
Brian Brock
Depends On:
Blocks: fedora-ia64
  Show dependency treegraph
Reported: 2006-02-19 10:34 EST by Prarit Bhargava
Modified: 2015-01-04 17:25 EST (History)
6 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Prarit Bhargava 2006-02-19 10:34:17 EST
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


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 

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 15:28:26 EST
rpmbuild is voodoo to me, maybe Paul knows. (Cc'd)
Comment 2 Paul Nasrat 2006-03-01 15:22:03 EST
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 11:11:26 EST
%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 ... 
Comment 4 Paul Nasrat 2006-03-14 11:28:34 EST
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/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

Comment 5 Prarit Bhargava 2006-04-26 10:21:09 EDT
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 ...


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