Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004304OCamlOCaml generalpublic2007-05-27 21:272013-07-12 18:15
Assigned Toxclerc 
PlatformOSOS Version
Product Version3.10.0 
Target Version4.01.1+devFixed in Version3.10+dev 
Summary0004304: ocamlbuild -I does not add directories to the compiler search paths.
Description> echo "Thread.create (fun () -> ())" >

cannot be compiled with

> ocamlbuild -I +threads -libs unix,threads test.native

but must be compiled with

> ocamlbuild -cflags -I,+threads -lflags -I,+threads -libs unix,threads test.native

If this is a feature, documentation and ocambuild -help should make this point clear. Even better would be to rename the option (e.g. -dir and -xdir for -I and -X) since this is inconsistent with the rest of the toolsuite which always uses -I with the same meaning.


TagsNo tags attached.
Attached Files

- Relationships

-  Notes
dbuenzli (reporter)
2007-05-31 14:54

It also seems to be impossible to pass a -I argument (or any other argument btw) to ocamldoc via an ocamlbuild invocation which makes it unusable to produce documentation that depends on external libraries.
berke (reporter)
2007-07-30 18:42

The command
  ocamlbuild -tag thread -lib unix test.native
should do the job
ertai (developer)
2007-11-26 14:05

Thanks for the report. This is now fixed in the CVS (both in trunk and release310 branch).
dbuenzli (reporter)
2008-11-16 19:15

The fix doesn't seem to work on ocamlbuild 3.11.0+beta1. Tried the same example, note that this is not for using threads. The example is just for you to reproduce.


dbuenzli (reporter)
2010-04-07 15:33

In fact -I seems to work only with directories that are in the hierarchy starting at the root of the ocamlbuild's current working directory. Is that a feature ?

I my case I would really like to be able to invoke

ocamlbuild -I +sdl -lib sdl

instead of

ocamlbuild -cflags -I,+sdl -lflags -I,+sdl -lib sdl
ertai (developer)
2010-04-07 15:53

That is indeed a feature, at least an initial design choice that -I directories are all managed by ocamlbuild.

This is not a definitive status, though.

- Issue History
Date Modified Username Field Change
2007-05-27 21:27 dbuenzli New Issue
2007-05-31 14:54 dbuenzli Note Added: 0004085
2007-07-30 18:42 berke Note Added: 0004125
2007-11-10 15:00 xleroy Status new => assigned
2007-11-10 15:00 xleroy Assigned To => ertai
2007-11-26 14:05 ertai Note Added: 0004349
2007-11-26 14:05 ertai Status assigned => resolved
2007-11-26 14:05 ertai Resolution open => fixed
2007-11-26 14:05 ertai Fixed in Version => 3.10+dev
2008-11-16 19:15 dbuenzli Note Added: 0004749
2008-11-16 19:15 dbuenzli Status resolved => feedback
2008-11-16 19:15 dbuenzli Resolution fixed => reopened
2010-04-07 15:33 dbuenzli Note Added: 0005306
2010-04-07 15:53 ertai Note Added: 0005307
2010-07-22 11:42 ertai Status feedback => assigned
2010-07-22 11:42 ertai Assigned To ertai => xclerc
2010-07-22 11:42 ertai Assigned To xclerc => ertai
2010-07-22 11:44 ertai Assigned To ertai => xclerc
2012-07-11 16:08 doligez Target Version => 4.01.0+dev
2012-07-31 13:37 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-15 00:01 doligez Target Version 4.00.1+dev => 4.01.0+dev
2013-06-17 10:21 gasche Target Version 4.01.0+dev => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker