topochecker icon indicating copy to clipboard operation
topochecker copied to clipboard

Error: Unbound value Bigarray.Array2.map_file

Open verifierlife opened this issue 5 years ago • 3 comments

After clone the code to my Mac OS Calinta, I run "make". but it follows: ` cd src && make make slowclean rm -rf .cm a.out ~ # *.o tcParser.ml tcLexer.ml tcParser.mli ocamlbuild -use-ocamlfind -pkg camlimages,camlimages.all_formats -pkg bytes -pkg bigarray -pkg str -pkg unix -pkg ocamlgraph -pkg csv main.native && cp -L main.native topochecker && rm main.native + ocamlfind ocamlc -c -package csv -package ocamlgraph -package unix -package str -package bigarray -package bytes -package camlimages,camlimages.all_formats -o slice.cmo slice.ml File "slice.ml", line 14, characters 12-36: 14 | let map = Bigarray.Array2.map_file chan ^^^^^^^^^^^^^^^^^^^^^^^^ Error: Unbound value Bigarray.Array2.map_file Command exited with code 2. Command exited with code 2. Hint: Recursive traversal of subdirectories was not enabled for this build, as the working directory does not look like an ocamlbuild project (no '_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories, you should add the option "-r" or create an empty '_tags' file.

To enable recursive traversal for some subdirectories only, you can use the following '_tags' file:

  true: -traverse
  <dir1> or <dir2>: traverse
  

Compilation unsuccessful after building 8 targets (7 cached) in 00:00:00. make[1]: *** [fast] Error 10 make: *** [src/topochecker] Error 2 ` Who can give me some suggestions?

verifierlife avatar Nov 18 '19 14:11 verifierlife

Hi,

there have been recent changes in the OCaml libraries which topochecker has not tracked yet.

https://caml.inria.fr/pub/docs/manual-ocaml/libbigarray.html

I think your first problem (the one above) depends from the fact that map_file has been moved to the "Unix" library, so try replacing "Bigarray.Array2.map" with "Unix.map_file", but then you need perhaps to rearrange the parameters. Let me know if this helps, I'll also try to fix it in the repository.

vincenzoml avatar Nov 19 '19 14:11 vincenzoml

Hi again,

I just committed a fix to the master branch. The code compiles again, and hopefully should run as expected, please let me know.

vincenzoml avatar Nov 19 '19 17:11 vincenzoml

@vincenzoml It's ok now except some warnings. Thanks a lot. You are doing a great job.

verifierlife avatar Nov 20 '19 03:11 verifierlife