3

I am trying to install ocamlgraph as a requirement for frama-c. When I am installing ocamlgraph and run make, I am getting the following compilation errors:

ocamlopt.opt -c -I src -I lib -for-pack Graph src/delaunay.ml  
/tmp/camlasmc2c286.s: Assembler messages:  
/tmp/camlasmc2c286.s: Error: .size expression for camlGraph__Delaunay__ccw_291 does not evaluate to a constant  
/tmp/camlasmc2c286.s: Error: .size expression for camlGraph__Delaunay__in_circle_298 does not evaluate to a constant  
File "src/delaunay.ml", line 1, characters 0-1:  
Error: Assembler error, input left in file /tmp/camlasmc2c286.s  

I am running on Ubuntu-10.04 and have tried ocamlgraph-1.6 and ocamlgraph-1.8.2 versions with the same error. The ocaml version on my machine is ocaml-3.11.2.

Thanks

  • 1
    Can you compile any OCaml file at all? The errors you get look pretty generic and likely to occur with any nontrivial ML file (they also look like they come from a problem with your OCaml compiler, not with ocamlgraph) – Pascal Cuoq Aug 31 '12 at 22:45

1 Answers1

3

This is a bug that was provoked last year by a change of version of binutils. You can fix it either by installing an older version of binutils on your system (not recommended), or a more recent version of OCaml (starting from ocaml 3.12.1).

gasche
  • 31,259
  • 3
  • 78
  • 100
  • 2
    OCaml 4.00.0 does not compile Frama-C either (for completely different reasons). If the OP's purpose is eventually to compile Frama-C, he should upgrade to OCaml 3.12.1 exactly. – Pascal Cuoq Sep 02 '12 at 19:20
  • 1
    Frama-C compiled with ocaml-3.12.1 without any problems. Thanks ! – pranav garg Sep 04 '12 at 22:01