Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004896OCamlOCamlbuild (the tool)public2009-10-16 13:382011-05-29 12:20
Reporterygrek 
Assigned Toertai 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.1 
Target VersionFixed in Version3.11.2+dev 
Summary0004896: ocamlbuild should pass -I to ocamldoc for external libraries
DescriptionLooks like ocamlbuild doesn't pass include directories to ocamldoc when building documentation referencing external libraries.

Workaround -- add the -I flag manually :
    flag ["ocaml"; "doc"; "use_extLib"] (S[A"-I"; A "+extlib"]);
Additional Information$ cat q.ml
let f () = Enum.empty ()

$ cat q.odocl
Q

$ cat _tags
true: use_extLib

$ cat myocamlbuild.ml
open Ocamlbuild_plugin

;;

dispatch begin function
| After_rules ->

     ocaml_lib ~extern:true ~dir:"+extlib" "extLib";
(* flag ["ocaml"; "doc"; "use_extLib"] (S[A"-I"; A "+extlib"]); *)

| _ -> ()
end

$ ocamlbuild -classic-display q.byte
/usr/bin/ocamlopt.opt -I /usr/lib/ocaml/ocamlbuild unix.cmxa /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
/usr/bin/ocamldep.opt -modules q.ml > q.ml.depends
/usr/bin/ocamlc.opt -c -I +extlib -o q.cmo q.ml
/usr/bin/ocamlc.opt -I +extlib extLib.cma q.cmo -o q.byte

$ ocamlbuild -classic-display q.docdir/index.html
/usr/bin/ocamldoc.opt -dump q.odoc q.ml
+ /usr/bin/ocamldoc.opt -dump q.odoc q.ml
File "q.ml", line 2, characters 11-21:
Error: Unbound value Enum.empty
1 error(s) encountered
Command exited with code 1.
TagsNo tags attached.
Attached Filespatch file icon ocamlbuild.patch [^] (537 bytes) 2009-11-03 16:48 [Show Content]

- Relationships

-  Notes
(0005146)
ygrek (reporter)
2009-11-03 16:31

The same goes for "*.inferred.mli"
Manual fix :
    flag ["ocaml"; "infer_interface"; "use_extLib"] (S[A"-I"; A "+extlib"]);
(0005147)
ygrek (reporter)
2009-11-03 16:49

Straightforward fix attached

- Issue History
Date Modified Username Field Change
2009-10-16 13:38 ygrek New Issue
2009-10-18 10:47 xleroy Status new => assigned
2009-10-18 10:47 xleroy Assigned To => ertai
2009-11-03 16:31 ygrek Note Added: 0005146
2009-11-03 16:48 ygrek File Added: ocamlbuild.patch
2009-11-03 16:49 ygrek Note Added: 0005147
2009-12-07 10:51 xclerc Status assigned => resolved
2009-12-07 10:51 xclerc Fixed in Version => 3.11.2+dev
2009-12-07 10:51 xclerc Resolution open => fixed
2011-05-29 12:20 xleroy Status resolved => closed
2012-02-02 15:17 protz Category OCamlbuild => OCamlbuild (the tool)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker