Bug 631771 - binutils-2.20.51.0.10 breaks x86_64 assembly on Xeon E5540
Summary: binutils-2.20.51.0.10 breaks x86_64 assembly on Xeon E5540
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: rawhide
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-08 11:13 UTC by Jens Petersen
Modified: 2010-09-16 10:13 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-16 10:13:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jens Petersen 2010-09-08 11:13:16 UTC
Description of problem:
Current binutils-2.20.51.0.10 seems to break compile
the assembly output from ghc's Native Code Generator
on x86_64 rawhide on Xeon E5540 CPUs.

Version-Release number of selected component (if applicable):
binutils-2.20.51.0.10-3.fc15

How reproducible:
every time on x86-NN.phx2.fedoraproject.org (with NN >= 10)

Steps to Reproduce:
1. Try to build Haskell library or package in rawhide with ghc
  
Actual results:
as /tmp/ghc7450_0/ghc7450_0.s -o dist/build/System/Glib/Attributes.dyn_o
/tmp/ghc7450_0/ghc7450_0.s: Assembler messages:
/tmp/ghc7450_0/ghc7450_0.s:992:0:
     Error: junk `el' after expression
/tmp/ghc7450_0/ghc7450_0.s:992:0:
     Error: 8-byte relocation cannot be applied to 4-byte field
/usr/bin/ghc returned ExitFailure 1

Expected results:
To succeed like on older CPUs (x86-NN.phx2 (with NN <= 09)

Additional info:
http://koji.fedoraproject.org/koji/getfile?taskID=2454643&name=build.log
http://koji.fedoraproject.org/koji/taskinfo?taskID=2454643

Comment 1 Jens Petersen 2010-09-08 23:59:40 UTC
I forgot a few more details though I have already communicated
them to Nick in email earlier.

F14 (with binutils-2.20.51.0.7) is unaffected.

Koji buildservers:

x86-{13,15,16,17,19,20}.phx2: seem to be all Xeon Quad Core E5540 blades.

x86-{01,02,03,04,07}.phx2: should all be older Xeon Dual Core 5140 blades

The failures are only seen on the new E5540 blades for dist-f15.

Comment 2 Jens Petersen 2010-09-09 02:32:13 UTC
One more datapoint the failures seem to be related to
dynamically linked code (PIC?).  Statically linked
objects are building fine but not dynamically linked objects.

Comment 3 Jens Petersen 2010-09-09 03:28:43 UTC
I got access to a E5540 server and reproduced the problem there by hand
in a f15 mock x86_64 buildroot.

I used this test package:

http://petersen.fedorapeople.org/testcase-ghc-binutils-0.1-1.fc13.src.rpm

which just runs "as" on some assembler generated earlier by ghc when
compiling gtk2hs-buildtools in koji.

Fails in dist-f15 x86_64 with binutils-2.20.51.0.10-3.fc15.x86_64

Reverting the f15 buildroot to binutils-2.20.51.0.7-5.fc14.x86_64 
and the build succeeds.

So confirming that this is definitely caused by the changes in
the latest binutils version.

Comment 4 Jens Petersen 2010-09-10 03:54:48 UTC
A none haskell example (fldigi): http://koji.fedoraproject.org/koji/getfile?taskID=2458724&name=build.log

g++ -DHAVE_CONFIG_H -I.  -DBUILD_FLDIGI -DLOCALEDIR=\"/usr/share/locale\" -I. -I./include -I./irrxml -I./fileselector  -pthread   -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT       -D_REENTRANT     -I/usr/include/libpng12   -I/usr/include/libxml2       -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions  -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c -o fldigi-Fl_Text_Editor_mod.o `test -f 'widgets/Fl_Text_Editor_mod.cxx' || echo './'`widgets/Fl_Text_Editor_mod.cxx
{standard input}: Assembler messages:
{standard input}:5214: Error: junk `ff' after expression
{standard input}:5214: Error: 8-byte relocation cannot be applied to 4-byte field
make[2]: *** [fldigi-trx.o] Error 1

(correcting comment 1: x86-09 is also a E5540 CPU.)


Would it be useful to get a newer binutils into dist-f15 to test
or better to revert to binutils-2.20.51.0.7 for now perhaps?

Comment 5 Jens Petersen 2010-09-10 04:25:44 UTC
I see there is a newer upstream release: binutils-2.20.51.0.11.

Comment 6 Jens Petersen 2010-09-10 04:46:27 UTC
and seems to fix the problem. :-)  :-/

Could you please update binutils in rawhide to 2.20.51.0.11 ASAP?

Comment 7 Jens Petersen 2010-09-10 05:00:15 UTC
I built ghc-glib and fldigi on the E5540 box using 2.20.51.0.11 successfully.

Comment 8 Nick Clifton 2010-09-10 10:23:57 UTC
I have created a new binutils rpm based on the 2.20.51.0.11 source release.  This should resolve the problem.

Comment 9 Jens Petersen 2010-09-13 00:22:32 UTC
Thank you

Looks good to me now - I updated xmonad successfully:

http://koji.fedoraproject.org/koji/buildinfo?buildID=194937


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