我在我的主目录中有一个 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