Inconsistent assumptions over interface (Ocaml)表明我重建并尝试了但无济于事。
我使用mac端口来管理我的大多数开发工具,自从升级到Mac OS 10.8.2后,ocaml和ocaml-ounit之间的交互似乎很糟糕。
下面是一个非常小的shell转储,但问题是
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
下面是我尝试构建本机二进制文件的shell转储(.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.
答案 0 :(得分:2)
Going nuclear解决了这个问题:
重新安装端口
重新安装您的端口:
保存已安装端口的列表:
port -qv已安装> myports.txt
卸载所有已安装的端口:
sudo port -f uninstall installed
清理所有部分完成的版本:
sudo port clean all
- 醇>
浏览myports.txt并逐个安装您实际想要使用的端口(而不是仅作为依赖项所需的端口),记住要指定适当的变体:
sudo port install portname + variant1 + variant2 ...
请注意,如果您指定的变体不是默认变体,则可能需要按照myports.txt中记录的字母顺序以外的顺序安装端口。