0

我在我的主目录中有一个 opam 的本地安装和一个 ocaml 编译器和几个库的(fedora)包安装。

在任何项目中运行 ocamlbuild 命令都会产生很多警告:

findlib: [WARNING] Package dynlink has multiple definitions in /home/choeger/.opam/system/lib/dynlink/META, /usr/lib64/ocaml/dynlink/META
findlib: [WARNING] Package bigarray has multiple definitions in /home/choeger/.opam/system/lib/bigarray/META, /usr/lib64/ocaml/bigarray/META
findlib: [WARNING] Package unix has multiple definitions in /home/choeger/.opam/system/lib/unix/META, /usr/lib64/ocaml/unix/META
findlib: [WARNING] Package camlp4 has multiple definitions in /home/choeger/.opam/system/lib/camlp4/META, /usr/lib64/ocaml/camlp4/META
findlib: [WARNING] Package threads has multiple definitions in /home/choeger/.opam/system/lib/threads/META, /usr/lib64/ocaml/threads/META

我对 opam 的理解是支持不同位置的多个安装,但是这些警告会使任何编译输出变得混乱。

有没有办法告诉 findlib 我知道这些其他安装并且不打印这些无用的警告?

编辑:因为我被要求提供我的 ocamlfind 输出:

choeger@daishi ~ % ocamlfind printconf
    Effective configuration:
    Configuration file:
        /home/choeger/.opam/system/lib/findlib.conf
    Search path:
        /home/choeger/.opam/system/lib
        /usr/lib64/ocaml
    Packages will be installed in/removed from:
        /home/choeger/.opam/system/lib
    META files will be installed in/removed from:
        the corresponding package directories
    The standard library is assumed to reside in:
        /usr/lib64/ocaml
    The ld.conf file can be found here:
        /usr/lib64/ocaml/ld.conf
4

1 回答 1

1

我刚刚找到了问题的解决方案:

 sudo yum remove ocaml-findlib

显然,这个包附带了所有那些双重定义的 ocaml 库。我仍然认为 opam 应该能够处理这种情况(IMO 更具体的包管理器应该总是对更不具体的安装敏感),但是 opam 还没有被 Fedora 打包,所以应该预料到这样的事情。至少烦人的警告消失了。

于 2014-04-22T13:27:12.037 回答