choeger
choeger

Reputation: 3567

Opam / findlib warning "... has multiple definitions"

I have a local installation of opam in my home directory and a (fedora) package installation of the ocaml compiler and several libraries.

Running a ocamlbuild command in any project gives a lot of warnings:

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

My understanding of opam is that multiple installations in different locations are supported, but these warnings clutter any compilation output.

Is there a way to tell findlib that I know of these other installations and to not print these useless warnings?

edit: Since I was asked for my ocamlfind output:

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

Upvotes: 0

Views: 510

Answers (1)

choeger
choeger

Reputation: 3567

I just found the solution to the problem:

 sudo yum remove ocaml-findlib

Apparently, this package ships with all those double-defined ocaml libraries. I still think opam should be able to deal with this situation (IMO the more specific package manager should always be sensible to more unspecific installations), but opam is not packaged by fedora yet, so something like this should be expected. At least the annoying warning is gone.

Upvotes: 1

Related Questions