为什么使用MacPorts构建ocaml-bin-prot会失败?

时间:2013-11-10 22:54:48

标签: ocaml macports

我正在尝试使用 Real World Ocaml 来学习Ocaml。我使用MacPorts安装了ocaml。现在,我正在尝试安装ocaml-core-extended

$ sudo port install ocaml-core-extended

但在安装依赖项ocaml-bin-prot时失败:

以下是构建日志中的相关部分:

:notice:build --->  Building ocaml-bin-prot
:debug:build Executing org.macports.build (ocaml-bin-prot)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build 
:info:build getconf: no such configuration parameter `LFS64_CFLAGS'
:info:build ocamlfind ocamldep -pp 'cpp -traditional -undef -w -DARCH_SIXTYFOUR' -package unix -package bigarray -modules lib/type_class.mli > lib/type_class.mli.depends
:info:build + ocamlfind ocamldep -pp 'cpp -traditional -undef -w -DARCH_SIXTYFOUR' -package unix -package bigarray -modules lib/type_class.mli > lib/type_class.mli.depends
:info:build File "lib/type_class.mli", line 68, characters 16-20:
:info:build Error: Syntax error
:info:build Command exited with code 2.
:info:build E: Failure("Command '/opt/local/bin/ocamlbuild lib/libbin_prot_stubs.a lib/dllbin_prot_stubs.so lib/bin_prot.cma lib/bin_prot.cmxs lib/bin_prot.cmxa lib/bin_prot.a syntax/pa_bin_prot.cma -tag debug' terminated with error code 10")
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build 
:info:build Exit code: 1
:error:build org.macports.build for port ocaml-bin-prot returned: command execution failed

我查看了lib/type_class.mli,我不知道为什么会出现语法错误。这只是一次宏观扩张。我希望我的错误报告比“这是一个问题”好一点。

那么,有没有人遇到过这种失败?任何提示?

 $ uname -a
Darwin zzzz.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013;
 root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
 $ ocaml -version
The OCaml toplevel, version 4.01.0
 $ cpp --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

2 个答案:

答案 0 :(得分:2)

我假设我遇到的具体问题与过渡到小牛的关系比其他任何问题都要多。

与此同时,我决定使用opam安装ocamlbrew,一切顺利。

我能够在instructions之后设置我的环境。

答案 1 :(得分:1)

核心库的版本是什么?看起来这个库没有为OCaml 4.01更新,可能是端口很旧而且还没有赶上..