简体   繁体   中英

Frama-C unbound module Z build error

Using Ubuntu 14.04, I downloaded the Neon Frama-C distribution, and installed the required tools: labgtk, sourceview, etc. I configured Frama-C no problem, but on building got:

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

The problem is

 let n = Z.of_bits str in

where Z denotes a module that is not imported (I guess). I do not know what Z is supposed to refer to so I have no way of trying to fix this.

Have you installed the zarith library ( libzarith-ocaml-dev under Ubuntu)? Frama-C can use two libraries for arbitrary precision integers: either Bignum , which is included in OCaml distribution (although I wouldn't be surprised that Debian/Ubuntu did manage to make it a separate package ), or Zarith , a newer, more efficient implementation. unz.ml is part of the code that binds Zarith to Frama-C, thus if you don't have Zarith installed, you will have some issues compiling it.

Normally, ./configure should take care of choosing the appropriate library. You can check what it has found in config.log . A possible issue is that you have package libzarith-ocaml installed but not libzarith-ocaml-dev . In this case, the library itself is installed (and presumably detected by ./configure ), but not the headers needed to compile the code against it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM