OPAM provides one (or more) OCaml installations that are independent of the default by default, that is, a compiler or libraries typically located in /usr/bin , /usr/lib/ocaml or /usr/local/blahblah . Thus, your manually installed OCaml system based on OPAM can coexist. All OPAM installation is done under $HOME/.opam/switch/ (default = switch = system), including the executable. So, for your case, OCamlFind has not been overwritten by OPAM. OPAM installed another OCamlFind in a different directory.
Which system can be "switched" using environment variables. "opam config env" shows the variables you must declare in order to use the current "switch". If you want to use the default setting, make sure that these variables do not reference OPAM stuff.
To live with your compiled libraries and OPAM packages, recompile them and reinstall them in a switched OPAM environment. Please note that OPAM may overwrite your packages here. For example, if you install ocamlfind manually in the "system" OPAM dir, then if you type "opam install ocamlfind", OPAM will overwrite your OCamlFind installation. (Oh, BTW, I think OPAM warns us when it overwrites an existing installation here, because the OPAM package has no information about which OCamlFind packages it installs).
Using libraries installed in the default location and OPAM packages at the same time ... AFAIK, is not easy. I think at least OPAM is not intended for such use. To avoid confusing library paths, put them in one of the OPAM switches.
If you have any OPAM suggestions in the future, post them at https://github.com/OCamlPro/opam .
source share