我一直想和Opa弄脏手,但是我真的觉得缺少REPL,这是我接受新语言选择的武器。瞧,Opa博客提到了一个名为opatop
的工具,似乎就是这样,但它似乎不包含在标准的Mac或Ubuntu发行版中。
我长途跋涉到GitHub,抓住了源头,然后开始构建,但是我收到了here提到的错误:
+ /opt/local/bin/ocamlopt.opt dynlink.cmxa unix.cmxa str.cmxa nums.cmxa -g threads.cmxa -thread -I +zip zip.cmxa -I +ocamlgraph graph.cmxa -I /opt/local/lib/ocaml/ulex ulexing.cmxa buildinfos.cmxa libbase.cmxa compilerlib.cmxa libtrx.cmxa opacapi.cmxa passlib.cmxa libqmlcompil.cmxa jslang.cmxa ocamllang.cmxa libbsl.cmxa libbsl/bslregister.cmx opalang.cmxa -o libbsl/bslregister.native
File "_none_", line 1, characters 0-1:
Error: Cannot find file dynlink.cmxa
Command exited with code 2.
我对OCaml开发几乎一无所知,但看起来在相关库目录中具有相同扩展名的其他文件是“OCaml本机库文件”。鉴于此,这只是一个未包含在OCaml发行版中的库我最终得到了吗?上面链接中引用的Mantis bug使得工作中的构建环境可能存在相互矛盾的假设。
无论如何,有人可以提供任何建议吗?
谢谢!
答案 0 :(得分:2)
OCaml尚未使用Lion的本机dynlink构建,因此默认安装下不存在dynlink.cmxa。
以下补丁将允许您构建它。在OCaml src目录patch -p1 < PATH/TO/PATCH
内,并根据需要重新安装OCaml。
这适用于OCaml 3.12.1
--- a/configure 2011-07-04 14:15:01.000000000 -0700
+++ b/configure 2011-08-26 10:18:42.000000000 -0700
@@ -619,9 +619,9 @@
case "$host" in
*-*-cygwin*) natdynlink=true;;
i[3456]86-*-linux*) natdynlink=true;;
x86_64-*-linux*) natdynlink=true;;
- i[3456]86-*-darwin10.*)
+ i[3456]86-*-darwin1[01].*)
if test $arch64 == true; then
natdynlink=true
fi;;
i[3456]86-*-darwin[89]*) natdynlink=true;;
答案 1 :(得分:1)
我已经调查了OS X Lion下的Opa构建,并在opalang上推出了2个补丁,等待批准以解决主要问题。
所以,当补丁可用时,这是我的步骤(我记得)让Opa在Lion下工作:
首先,安装必要的工具:
然后从源代码编译Opa: