4

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.

Jonathan Gallagher
  • 2,115
  • 2
  • 17
  • 31

1 Answers1

7

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 Zarithinstalled, 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.

Virgile
  • 9,724
  • 18
  • 42
  • 1
    The advantages of the Zarith library over Bignum are revealed in these blog posts: http://blog.frama-c.com/index.php?post/2011/10/09/Zarith and http://blog.frama-c.com/index.php?post/2011/10/17/Features-in-Nitrogen-1 – Pascal Cuoq May 28 '14 at 07:34
  • It was exactly that libzarith-ocaml was installed and not libzarith-ocaml-dev – Jonathan Gallagher May 28 '14 at 22:02