Bug 691896 - gas: .size expression does not evaluate to a constant
gas: .size expression does not evaluate to a constant
Product: Fedora
Classification: Fedora
Component: ocaml (Show other bugs)
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
Depends On:
Blocks: 631302 676688
  Show dependency treegraph
Reported: 2011-03-29 16:13 EDT by Jerry James
Modified: 2011-04-18 00:07 EDT (History)
5 users (show)

See Also:
Fixed In Version: ocaml-3.12.0-5.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-04-18 00:07:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Assembly file illustrating the problem (19.18 KB, application/octet-stream)
2011-03-29 16:13 EDT, Jerry James
no flags Details

  None (edit)
Description Jerry James 2011-03-29 16:13:37 EDT
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):

How reproducible:

Steps to Reproduce:
1. Attempt to build vanilla coq-8.3pl1 from the coq web site
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 16:21:32 EDT
Manual inspection has been insufficient then.  You have:
.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
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 16:24:18 EDT
See http://caml.inria.fr/mantis/view.php?id=5237
Comment 3 Richard W.M. Jones 2011-03-30 08:38:17 EDT
Thanks, I will apply:

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 08:42:36 EDT
Comment 5 Richard W.M. Jones 2011-03-30 09:02:56 EDT
Also ported it to F15:
Comment 6 Fedora Update System 2011-03-30 09:14:51 EDT
ocaml-3.12.0-5.fc15 has been submitted as an update for Fedora 15.
Comment 7 Jerry James 2011-03-30 12:55:42 EDT
(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-30 23:51:59 EDT
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:
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2011-04-18 00:07:41 EDT
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.

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