4

I'm just trying my code with OCaml 4.02 (using opam) and I get lots of warnings like this:

File "_tags", line 14, characters 121-134:
Warning: the tag "link(utils.o)" is not used in any flag
declaration, so it will have no effect; it may be a typo.
Otherwise use `mark_tag_used` in your myocamlbuild.ml to
disable this warning.

But it is defined in myocamlbuld.ml:

pdep ["link"] "link" (fun param -> [param]);

I can get rid of it with:

mark_tag_used("link(utils.o)");

But I need one such line for every use of the tag! Also, my code then won't build with earlier versions of OCaml. What's the general fix?

(full code is at https://github.com/0install/0install)

Thomas Leonard
  • 7,068
  • 2
  • 36
  • 40
  • I've compiled a project of mine with 4.02.0 and getting the same warning over a number of tags that are in fact used. I haven't looked at it much yet, but curious if you had tracked down the cause. – nlucaroni Sep 25 '14 at 02:53
  • No I haven't yet. I went back to 4.01.0 due to a separate problem with slow compiles (which will be fixed in 4.02.1 I hear). – Thomas Leonard Sep 26 '14 at 09:53
  • It seems to be a so-far-unreported ocamlbuild bug. You should feel free to report such issues [on the bugtracker](http://caml.inria.fr/mantis/). – gasche Jun 05 '15 at 14:47
  • I reported this as [PR#6893](http://caml.inria.fr/mantis/view.php?id=6893) and it should now be fixed. – gasche Jun 06 '15 at 05:12

1 Answers1

0

I got rid of same warning when I did

dispatch @@ MyOCamlbuildBase.dispatch_combine [
  begin function
    (* ... *)
  end;
  dispatch_default
]
;;

instead of

dispatch 
begin function (* ... *)

in my myocamlbuild.ml and re-run oasis setup. YMMV