Using ocamlbuild on the following example to build native code includes a library twice, causing an error, but byte-code works fine. Am I doing something wrong or is it a bug? Thanks for any help. ~/tmp$ cat myocamlbuild.ml open Ocamlbuild_plugin;; open Command;; dispatch begin function | After_rules -> ocaml_lib ~extern:true "unix"; | _ -> () end;; ~/tmp$ cat _tags : use_unix ~/tmp$ cat pwd.ml let _ = print_endline (Unix.getcwd()) ~/tmp$ ocamlbuild pwd.byte Finished, 3 targets (3 cached) in 00:00:00. ~/tmp$ ocamlbuild pwd.native + /usr/local/bin/ocamlopt.opt unix.cmxa unix.cmxa pwd.cmx -o pwd.native Files /usr/local/lib/ocaml/unix.cmxa and /usr/local/lib/ocaml/unix.cmxa both define a module named Unix Command exited with code 2. Compilation unsuccessful after building 4 targets (2 cached) in 00:00:00.