我对OCaml完全陌生,但是已经完成了一个项目,其中包括使用z3 SAT求解器来测试和收集数据。我通过Opam安装了所有组件,但出现以下错误。我正在使用Ubuntu 18.04。
也就是说,我安装了Opam和OCaml 4.08.0,并安装了z3,Zarith和Menhir软件包。我将通过Oasis(项目随附的_oasis文件)设置所有软件包。我还跟随this,因为开发人员警告我,将OCaml绑定到z3可能存在一些问题。出现此错误时,我尝试按照建议的here重新安装交换机,但无济于事。
这些是我要编译项目的步骤:
$ oasis setup -setup-update dynamic
$ make
但这会导致以下错误:
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
Command exited with code 2.
Compilation unsuccessful after building 57 targets (0 cached) in 00:00:16.
E: Failure("Command ''/home/john/.opam/4.08.0/bin/ocamlbuild' src/utils/utils.cma src/utils/utils.cmxa src/utils/utils.a src/utils/utils.cmxs src/parsing/parsing.cma src/parsing/parsing.cmxa src/parsing/parsing.a src/parsing/parsing.cmxs src/definitions/definitions.cma src/definitions/definitions.cmxa src/definitions/definitions.a src/definitions/definitions.cmxs src/definitions/symbolic-controllability/symcontrollability.cma src/definitions/symbolic-controllability/symcontrollability.cmxa src/definitions/symbolic-controllability/symcontrollability.a src/definitions/symbolic-controllability/symcontrollability.cmxs src/main.native -use-menhir -yaccflag --infer -tag debug' terminated with error code 10")
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1