The code doesn't compile on my Linux machine. The make
step fails:
ocamlc.opt: don't know what to do with src/plugins/callgraph.
Usage: ocamlc <options> <files>
...
share/Makefile.generic:70: recipe for target 'src/plugins/callgraph/options.cmi' failed
make: *** [src/plugins/callgraph/options.cmi] Error 2
It's invoking:
ocamlc.opt -c -w @a-3-4-6-9-41-44-45-48-50 -bin-annot -warn-error +a-32-33-34-35-36-37-38-39 -g -I src/plugins/slicing_types \
-I src/plugins/pdg_types -I src/plugins/value_types -I src/libraries/stdlib -I src/libraries/utils -I src/libraries/project \
-I src/libraries/datatype -I src/kernel_internals/parsing -I src/kernel_internals/typing -I src/kernel_internals/runtime \
-I src/kernel_services/parsetree -I src/kernel_services/ast_data -I src/kernel_services/ast_queries -I src/kernel_services/ast_printing \
-I src/kernel_services/cmdline_parameters -I src/kernel_services/plugin_entry_points -I src/kernel_services/abstract_interp \
-I src/kernel_services/visitors -I src/kernel_services/analysis -I src/kernel_services/ast_transformations \
-I src/plugins/gui -I /home/rprichard/work/tis-interpreter/lib/plugins -I lib -I devel_tools \
-I /home/rprichard/.opam/system/lib/findlib -I /home/rprichard/.opam/system/lib/zarith \
-I -I -I -I src/plugins/callgraph -I /home/rprichard/work/tis-interpreter/lib/plugins src/plugins/callgraph/options.mli
Notice the -I -I -I -I src/plugins/callgraph
.
I suspect the problem comes from these lines in the Makefile:
##########
# Zarith #
##########
ifeq ($(HAS_ZARITH),yes)
BYTE_LIBS+= zarith.cma easy_format.cmo biniou.cma yojson.cmo
OPT_LIBS+= zarith.cmxa easy_format.cmx biniou.cmxa yojson.cmx
EASYFORMAT_PATH=$(shell ocamlfind query easy-format)
BINIOU_PATH=$(shell ocamlfind query biniou)
YOJSON_PATH=$(shell ocamlfind query yojson)
INCLUDES+= -I $(ZARITH_PATH) -I $(EASYFORMAT_PATH) -I $(BINIOU_PATH) -I $(YOJSON_PATH)
src/libraries/stdlib/integer.ml: \
src/libraries/stdlib/integer.zarith.ml share/Makefile.config
$(REPLACE) $< [email protected]
$(CHMOD_RO) [email protected]
else
src/libraries/stdlib/integer.ml: \
src/libraries/stdlib/integer.bigint.ml share/Makefile.config
$(REPLACE) $< [email protected]
$(CHMOD_RO) [email protected]
endif
GENERATED += src/libraries/stdlib/integer.ml
I don't have the easy-format
, biniou
, or yojson
packages installed.
Here's my full build output: https://gist.github.com/rprichard/053db9cdcffccef8ae07673082cf31a9
I'm using 64-bit Debian Jessie with the system OCaml (4.01.0-5) and OPAM 1.2.0. I installed the zarith OPAM package, and I have these OPAM packages:
[email protected]:~/work/tis-interpreter$ opam list
# Installed packages for system:
base-bigarray base Bigarray library distributed with the OCaml compiler
base-threads base Threads library distributed with the OCaml compiler
base-unix base Unix library distributed with the OCaml compiler
conf-gmp 1 Virtual package relying on a GMP lib system installation.
conf-m4 1 Virtual package relying on m4
conf-ncurses 1 Virtual package relying on ncurses
conf-perl 1 Virtual package relying on perl
conf-pkg-config 1.0 Virtual package relying on pkg-config installation.
ocamlfind 1.6.2 A library manager for OCaml
zarith 1.4.1 Implements arithmetic and logical operations over arbitrary-precision integers