Inconsistent assumptions over interface (Ocaml)暗示我重建,但我試過,但無濟於事。ocaml oUnit和主ocaml lib在實現上做出不一致的假設Unix
我使用mac端口來管理我的大部分開發工具,而且自升級到Mac OS 10.8.2之後,ocaml和ocaml-ounit之間似乎存在不良交互。
下面是一個相當小殼轉儲,但問題是
Error: Files /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa and /opt/local/lib/ocaml/unix.cmxa make inconsistent assumptions over implementation Unix
,並迫使作爲http://www.puredarwin.org/developers/macports/port描述的重建似乎並沒有解決這個問題:
要強制升級(重建)使用:
port -f upgrade vim
下面是我嘗試構建本機二進制文件的外殼轉儲(.byte
正常工作,但我即將開始一輪分析並希望配置本機執行)以及嘗試將mac端口彎曲到我的意願。
有關如何進一步調查此問題的任何想法將不勝感激。我寧願不從自己的源頭開始構建ocaml,因爲我希望能夠將我的項目分發給同事,並且只需最少的指示即可完成啓動和運行,因此我希望儘可能使用vanilla包。
> ocaml make.ml PegParserTest.native ocamlbuild \ -libs \ nums,str,unix,oUnit,graph \ -cflags \ -g,-w,+a-4,-warn-error,+a-4,-I,/opt/local/lib/ocaml/site-lib/oUnit,-I,/opt/local/lib/ocaml/site-lib/ocamlgraph \ -lflags \ -g,-I,/opt/local/lib/ocaml/site-lib/oUnit,-I,/opt/local/lib/ocaml/site-lib/ocamlgraph \ PegParserTest.native + /opt/local/bin/ocamlopt.opt -g -I /opt/local/lib/ocaml/site-lib/oUnit -I /opt/local/lib/ocaml/site-lib/ocamlgraph nums.cmxa str.cmxa unix.cmxa oUnit.cmxa graph.cmxa BinSearch.cmx ByteInput.cmx ByteOutput.cmx ListUtil.cmx Stringer.cmx Range.cmx Unicode.cmx CaseFold.cmx EditDistance.cmx SourcePosition.cmx Utf8.cmx Grammar.cmx Failures.cmx Opt.cmx StringUtil.cmx Path.cmx UnicodeCategories.cmx UnicodeSeq.cmx GrammarParser.cmx AnnotationChecker.cmx ArrayUtil.cmx BitBucket.cmx CodeUnit.cmx Conv.cmx DefaultProductions.cmx Encodable.cmx Flatten.cmx Trie.cmx FactorLeft.cmx Followers.cmx Inline.cmx PreSimplify.cmx SymmetricBoolMatrix.cmx TailCallOpt.cmx UnionPartition.cmx Simplifier.cmx FileTestSuite.cmx NumberSystem.cmx Regex.cmx PegParser.cmx ScalarCharValue.cmx TestHarnessWrapper.cmx PegParserTest.cmx -o PegParserTest.native File "_none_", line 1: Error: Files /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa and /opt/local/lib/ocaml/unix.cmxa make inconsistent assumptions over implementation Unix Command exited with code 2. Compilation unsuccessful after building 154 targets (153 cached) in 00:00:00. > sudo port selfupdate ---> Updating MacPorts base sources using rsync MacPorts base version 2.1.2 installed, MacPorts base version 2.1.2 downloaded. ---> Updating the ports tree ---> MacPorts base is already the latest version The ports tree has been updated. To upgrade your installed ports, you should run port upgrade outdated > sudo port upgrade outdated ---> Computing dependencies for automake ELIDED ---> Updating database of binaries: 100.0% ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. > port contents ocaml | grep -i unix.cm /opt/local/lib/ocaml/threads/threadUnix.cmi /opt/local/lib/ocaml/threads/threadUnix.cmx /opt/local/lib/ocaml/unix.cma /opt/local/lib/ocaml/unix.cmi /opt/local/lib/ocaml/unix.cmx /opt/local/lib/ocaml/unix.cmxa /opt/local/lib/ocaml/unix.cmxs /opt/local/lib/ocaml/vmthreads/threadUnix.cmi /opt/local/lib/ocaml/vmthreads/unix.cma > port contents ocaml-ounit | egrep '\.cm' /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cma /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmi /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmx /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxs /opt/local/lib/ocaml/site-lib/oUnit/oUnitDiff.cmi /opt/local/lib/ocaml/site-lib/oUnit/oUnitDiff.cmx > sudo port -f upgrade ocaml-ounit ocaml Password: ---> Scanning binaries for linking errors: 100.0% ---> No broken files found.
您可能想切換到使用opam來安裝OCaml。 –