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 に答える