我从http://protz.github.io/ocaml-installer/安装了OCaml 4.01.0。我现在正在尝试构建camlp5-6.11。当我跑./configure&&在cygwin中创建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
我该如何解决这个问题?
答案 0 :(得分:2)
我怀疑Camlp5的Makefile还没有在Windows上测试过。它可能无法正确处理反斜杠:实际上,在您的输出中,我可以看到D:OCamllib/compiler-libs
这使我认为错误位于Camlp5端:路径显然应该是D:\OCaml\lib...
。< / p>
关于windows的鲜为人知的事实:/
也可以作为路径分隔符使用,所以如果这是一个选项,你可能会尝试在Makefile中的某个地方硬编码d:/ocaml/
作为根目录您的OCaml安装,但您还必须修复Makefile以生成d:/ocaml/lib
作为库目录。