Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ocaml Frama-C未绑定模块Z构建错误_Ocaml_Frama C - Fatal编程技术网

Ocaml Frama-C未绑定模块Z构建错误

Ocaml Frama-C未绑定模块Z构建错误,ocaml,frama-c,Ocaml,Frama C,使用Ubuntu 14.04,我下载了Neon Frama-C发行版,并安装了所需的工具:labgtk、sourceview等。我配置了Frama-C,没有问题,但在构建时得到: File "external/unz.ml", line 39, characters 10-19: Error: Unbound module Z make: *** [external/unz.cmo] Error 2 问题是 let n = Z.of_bits str in 其中Z表示未导入的模块(我猜)。

使用Ubuntu 14.04,我下载了Neon Frama-C发行版,并安装了所需的工具:labgtk、sourceview等。我配置了Frama-C,没有问题,但在构建时得到:

File "external/unz.ml", line 39, characters 10-19:
Error: Unbound module Z
make: *** [external/unz.cmo] Error 2
问题是

 let n = Z.of_bits str in

其中Z表示未导入的模块(我猜)。我不知道Z应该指的是什么,所以我没有办法解决这个问题。

您是否安装了
zarith
库(
libzarith-ocaml-dev
在Ubuntu下)?Frama-C可以使用两个库来处理任意精度的整数:要么是OCaml发行版中包含的
Bignum
(尽管Debian/Ubuntu成功地将其作为一个单独的软件包并不奇怪),要么是
Zarith
,一个更新、更高效的实现
unz.ml
是绑定的代码的一部分
Zarith
到Frama-C,因此如果您没有安装
Zarith
,编译它时会遇到一些问题


通常,
/configure
应注意选择适当的库。您可以检查它在
config.log
中找到了什么。一个可能的问题是您安装了包
libzarith-ocaml
,但没有安装
libzarith-ocaml-dev
。在本例中,安装了库本身(可能是由
/configure
)检测到的),但没有针对它编译代码所需的头。

这些博客文章揭示了Zarith库相对于Bignum的优势:确切地说,是安装了libzarith ocaml,而不是安装了libzarith ocaml dev