首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ocaml电池编译:错误:剩余的OCaml编译文件:

ocaml电池编译:错误:剩余的OCaml编译文件:
EN

Stack Overflow用户
提问于 2012-11-22 16:49:35
回答 2查看 600关注 0票数 0
代码语言:javascript
复制
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

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

EN

回答 2

Stack Overflow用户

发布于 2012-11-22 17:46:32

你认识OPAM吗?

代码语言:javascript
复制
$ opam install batteries

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

编辑如何安装opam:

代码语言:javascript
复制
$ 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`
票数 1
EN

Stack Overflow用户

发布于 2012-11-22 17:45:43

您可以执行该脚本:

代码语言:javascript
复制
/home/fanzhihang/batteries-1.4.1/_build/sanitize.sh

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13508820

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档