0
Build mode: shared
ocamlbuild -no-links syntax.otarget byte.otarget src/batteries_help.cmo META shared.otarget
Finished, 0 targets (0 cached) in 00:00:00.
SANITIZE: a total of 3 files that should probably not be in your source tree
  has been found. A script shell file
  "/home/fanzhihang/batteries-1.4.1/_build/sanitize.sh" is being created.
  Check this script and run it to remove unwanted files or use other options
  (such as defining hygiene exceptions or using the -no-hygiene option).
Warning: Leftover OCaml type annotation files:
  File pa_estring_top.annot in libs/estring has suffix .annot
IMPORTANT: I cannot work with leftover compiled files.
ERROR: Leftover OCaml compilation files:
  File pa_estring_top.cmo in libs/estring has suffix .cmo
  File pa_estring_top.cmi in libs/estring has suffix .cmi
Exiting due to hygiene violations.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:02.
make: *** [all] Error 1

电池的这个编译错误真的让我很困惑。我应该如何修复错误?

4

2 回答 2

1

你知道OPAM吗?

$ opam install batteries

它将自动安装所有依赖项。

[编辑] 如何安装 opam:

$ git clone https://github.com/OCamlPro/opam
$ ./configure # (or ./configure --prefix=$HOME if you want to install under your $HOME)
$ make
$ make install
$ opam init
$ eval `opam config -env`
于 2012-11-22T09:46:31.830 回答
0

您可以执行脚本:

/home/fanzhihang/batteries-1.4.1/_build/sanitize.sh

这将删除 OCamlbuild 认为不应该在此处的文件(即 .annot、.cmo 和错误正在谈论的 .cmi)。

于 2012-11-22T09:45:42.797 回答