[ocaml-platform] Problem with the lib directory in opam's directory hierarchy

Thomas Gazagnaire thomas at gazagnaire.org
Wed Apr 22 18:20:30 BST 2015

>> Is there a better way to do this ? (I'm not asking to change the opam
>> directory structure, I just want to understand the best way to be
>> compatible with both distrib packagers and opam packagers).
> I think the simple answer (but other may want to confirm) is to not use `ocamlfind remove` at all. Once you removed the directory you are done. `ocamlfind remove` doesn't do anything more than removing the META file which you already destroyed.

That's unfortunately not totally true if you are also installing C stubs. In that case you will have stuff in $prefix/stublibs as well. But in most cases it is indeed correct.


>> Also, is it considered good practice to put in an ocamlfind package
>> directory files or subdirectory that were not installed via ocamlfind
>> install ?
> There should be no problem with that. You should really see ocamlfind as something that simply reads and interprets META file wherever they are. For example all my packages are usable with ocamlfind but I install them and remove them without using `ocamlfind` *at all* (I use opam's .install file, which opam handles automatically).  

More information about the Platform mailing list