Bug 691896

Summary: gas: .size expression does not evaluate to a constant
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: ocamlAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: fedora-ocaml-list, jakub, nickc, rjones, steph
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ocaml-3.12.0-5.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-18 04:07:46 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:
Bug Depends On:    
Bug Blocks: 631302, 676688    
Attachments:
Description Flags
Assembly file illustrating the problem none

Description Jerry James 2011-03-29 20:13:37 UTC
Created attachment 488554 [details]
Assembly file illustrating the problem

Description of problem:
I'm trying to build the latest version of coq in Rawhide.  The build fails on an ocaml-generated assembly file (attached).  The error message is:

/tmp/camlasmfec99f.s: Assembler messages:
/tmp/camlasmfec99f.s:1023: Error: .size expression with symbol `camlSegmenttree_log2_1037' does not evaluate to a constant
file "lib/segmenttree.ml", line 1, characters 0-1:
Error: Assembler error, input left in file /tmp/camlasmfec99f.s

Manual inspection shows that there is nothing wrong with that symbol.  It is declared properly, prior to the reference to it in the .size directive.  Also, the same file is processed successfully and without complaint by gas on a Fedora 14 machine.

Version-Release number of selected component (if applicable):
binutils-2.21.51.0.7-1.fc16.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Attempt to build vanilla coq-8.3pl1 from the coq web site
2.
3.
  
Actual results:
The build fails with the above error message on Rawhide.  (I haven't tried F-15 yet to see if the same failure happens there, but will soon.)

Expected results:
Successful build.

Additional info:

Comment 1 Jakub Jelinek 2011-03-29 20:21:32 UTC
Manual inspection has been insufficient then.  You have:
       .text
...
.L124:  call    caml_call_gc@PLT
.L125:  jmp     .L123
        .section        .rodata.cst8,"a",@progbits
.L122:  .quad   0x4000000000000000
        .type   camlSegmenttree__log2_1037,@function
        .size   camlSegmenttree__log2_1037,.-camlSegmenttree__log2_1037
        .text
thus obviously the size can't be constant, as . in the size expression
is in .rodata.cst8 section (in particular .L122+8), while camlSegmenttree__log2_1037 is in .text section.

Comment 2 Stéphane Glondu 2011-03-29 20:24:18 UTC
See http://caml.inria.fr/mantis/view.php?id=5237

Comment 3 Richard W.M. Jones 2011-03-30 12:38:17 UTC
Thanks, I will apply:
http://caml.inria.fr/mantis/file_download.php?file_id=418&type=bug

I checked the patch that Xavier applied upstream[1] and it is
identical to this one.

[1] http://caml.inria.fr/cgi-bin/viewcvs.cgi?diff_format=u&rev=10981&view=rev

Comment 4 Richard W.M. Jones 2011-03-30 12:42:36 UTC
http://koji.fedoraproject.org/koji/taskinfo?taskID=2960256

Comment 5 Richard W.M. Jones 2011-03-30 13:02:56 UTC
Also ported it to F15:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2960270

Comment 6 Fedora Update System 2011-03-30 13:14:51 UTC
ocaml-3.12.0-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/ocaml-3.12.0-5.fc15

Comment 7 Jerry James 2011-03-30 16:55:42 UTC
(In reply to comment #1)
> Manual inspection has been insufficient then.  You have:

D'oh!  Thanks everybody for your quick responses.  /Me goes off to study the assembly language book again.

Comment 8 Fedora Update System 2011-03-31 03:51:59 UTC
Package ocaml-3.12.0-5.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ocaml-3.12.0-5.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/ocaml-3.12.0-5.fc15
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2011-04-18 04:07:41 UTC
ocaml-3.12.0-5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.