0

我从http://protz.github.io/ocaml-installer/安装了 OCaml 4.01.0 。我现在正在尝试构建camlp5-6.11。当我在 cygwin 中运行 ./configure && make world.opt 时,我得到

...
sed -e "s|@VERSION@|6.11|" -e "s|@CAMLP5DIR@|D:\OCaml\lib/camlp5|" META.tpl > META
make[2]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11/etc'
make[2]: Entering directory '/cygdrive/d/Downloads/camlp5-6.11/top'
ocamlrun.exe ../boot/camlp5r.exe -nolib -I ../boot -mode S -o camlp5_top.ppo camlp5_top.ml
ocamlc.opt -warn-error A -I ../main -I ../boot -I ../ocaml_stuff/4.01.0/utils -I ../ocaml_stuff/4.01.0/parsing -I D:OCamllib/compiler-libs -c -impl camlp5_top.ppo
File "camlp5_top.ml", line 51, characters 14-32:
Error: Unbound module Toploop
../config/Makefile:20: recipe for target 'camlp5_top.cmo' failed
make[2]: *** [camlp5_top.cmo] Error 2
make[2]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11/top'
Makefile:26: recipe for target 'out' failed
make[1]: *** [out] Error 2
make[1]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11'
Makefile:141: recipe for target 'world.opt' failed
make: *** [world.opt] Error 2

我该如何解决?

4

1 回答 1

2

我怀疑 Camlp5 的 Makefile 没有在 Windows 上测试过。它可能无法正确处理反斜杠:确实,在您的输出中,我可以看到D:OCamllib/compiler-libs这导致我认为错误在于 Camlp5 方面:路径显然应该是D:\OCaml\lib....

关于 windows 的鲜为人知的事实:/也可以用作路径分隔符,因此如果可以选择,您可能会尝试d:/ocaml/在 Makefile 中的某个位置硬编码为 OCaml 安装的根目录,但您还必须修复Makefiled:/ocaml/lib作为库目录生成。

于 2013-11-06T10:30:45.560 回答