我尝试使用 Opam 提供的 Ocaml 版本编译 Ocaml 项目。我的 ocamlbuild、ocamlfind 和 oasis 似乎还可以:
/Users/fred/.opam/4.02.1/bin/ocamlbuild
dhcp-182-73:compil fred$ which ocamlfind
/Users/fred/.opam/4.02.1/bin/ocamlfind
dhcp-182-73:compil fred$ which oasis
/Users/fred/.opam/4.02.1/bin/oasis
但是当我尝试编译时,似乎调用了错误的ocamlbuild版本,甚至ocamlfind的版本是正确的,我认为它解释了为什么ocamlfind找不到sexplib库。
$ make
ocaml setup.ml -build
Finished, 0 targets (0 cached) in 00:00:00.
+ /Users/fred/.opam/system/bin/ocamlfind ocamldep -package threads -package sexplib.syntax -package core -package comparelib.syntax -modules src/tricot/tricot.mli > src/tricot/tricot.mli.depends
ocamlfind: Package `sexplib.syntax' not found
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
E: Failure("Command ''/usr/local/bin/ocamlbuild' src/tricot/tricot.cma src/tricot/tricot.cmxa src/tricot/tricot.a src/tricot/tricot.cmxs src/compil/compil.cma src/compil/compil.cmxa src/compil/compil.a src/compil/compil.cmxs src/main.native -use-ocamlfind -tag debug' terminated with error code 10")
make: *** [build] Error 1
我试图告诉 oasis 使用哪个版本的 ocambuild 没有成功,有人知道怎么做吗?谢谢