With the file structure shown below, assume you're in directory libb. Then:

$ ocamlc -I ../liba -c a.ml
(* no warnings *)

$ ocamlfind ocamlc -I ../liba -c a.ml
findlib: [WARNING] Interface a.cmi occurs in several directories: ., ../liba

Why does findlib do an extra check that the compiler is okay with? This is causing problems in a project where I'd like to build several packed libraries, and one reason for doing so is precisely to reuse module names. Am I going about this wrong? My goal is that within libb, the only module from liba that should be visible is Liba.


├── liba
│   ├── a.cmi
│   ├── a.cmo
│   ├── a.ml
│   ├── b.cmi
│   ├── b.cmo
│   ├── b.ml
│   ├── liba.cma
│   ├── liba.cmi
│   └── liba.cmo
└── libb
    ├── a.cmi
    ├── a.cmo
    └── a.ml