Bug 247466

Summary: gdb src.rpm won't build in ppc32/ppc64 environment
Product: Red Hat Enterprise Linux 5 Reporter: Petr Muller <pmuller>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.0CC: cagney, ohudlick
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0332 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 16:55:23 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
gzipped buildlog
none
Backported fix. none

Description Petr Muller 2007-07-09 14:43:01 UTC
Description of problem:
When building gdb from src.rpm on a ppc64 box with mixed ppc32/ppc64 
environment, the build gets architecture-confused and fails with messsages like:

/usr/bin/ld: warning: powerpc:common64 architecture of input file `version.o' 
is incompatible with powerpc:common output

/usr/src/redhat/BUILD/gdb-6.5/build-ppc64-redhat-linux-gnu/gdb/
gdbserver/../../../gdb/gdbserver/inferiors.c:109: relocation truncated to fit: 
R_PPC64_REL24 against `malloc'

Version-Release number of selected component (if applicable):
gdb-6.5-16.el5 and newer (errata candidates for 5.0.z and 5.1)

How reproducible:
always, when you have mixed ppc32/ppc64 environment 

Steps to Reproduce:
1. rpm -ihv gdb-6.5-16.el5.src.rpm
2. rpmbuild -ba /usr/src/redhat/SPECS/gdb.spec
3. kaboom
  
Actual results:
build fails

Expected results:
build succeeds

Additional info:
# uname -a
Linux 2.6.18-8.el5 #1 SMP Fri Jan 26 14:19:36 EST 2007 ppc64 ppc64 ppc64 GNU/
Linux

I'll attach full buildlog

Comment 1 Petr Muller 2007-07-09 14:45:48 UTC
Created attachment 158776 [details]
gzipped buildlog

Comment 2 Jan Kratochvil 2007-08-15 23:31:58 UTC
Created attachment 161413 [details]
Backported fix.

Comment 3 RHEL Program Management 2007-10-16 03:55:17 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 4 Jan Kratochvil 2007-12-04 13:56:23 UTC
Comitted to the RHEL-5 CVS:
* Tue Dec  4 2007 Jan Kratochvil <jan.kratochvil> - 6.5-26
- Fix rpm rebuild for PowerPC normal (biarch 32/64) installations (BZ 247466).


Comment 10 errata-xmlrpc 2008-05-21 16:55:23 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/RHBA-2008-0332.html