我正在尝试安装 ocamlgraph 作为 frama-c 的要求。当我安装 ocamlgraph 并运行 make 时,出现以下编译错误:
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
我在 Ubuntu-10.04 上运行并尝试了 ocamlgraph-1.6 和 ocamlgraph-1.8.2 版本,但出现相同的错误。我机器上的 ocaml 版本是 ocaml-3.11.2。
谢谢
最佳答案
这是 a bug这是去年 binutils
版本的变化引起的。您可以通过在系统上安装旧版本的 binutils(不推荐)或更新版本的 OCaml(从 ocaml 3.12.1 开始)来修复它。
关于ocaml - ocamlgraph 中的编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12222880/