Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamlbuild -I does not add directories to the compiler search paths. #4304

Closed
vicuna opened this issue May 27, 2007 · 8 comments
Closed

ocamlbuild -I does not add directories to the compiler search paths. #4304

vicuna opened this issue May 27, 2007 · 8 comments

Comments

@vicuna
Copy link

vicuna commented May 27, 2007

Original bug ID: 4304
Reporter: @dbuenzli
Status: resolved (set by @damiendoligez on 2017-02-27T13:52:54Z)
Resolution: won't fix
Priority: normal
Severity: minor
Version: 3.10.0
Target version: later
Fixed in version: 3.10+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @dbuenzli

Bug description

echo "Thread.create (fun () -> ())" > test.ml

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.

Best,

Daniel

@vicuna
Copy link
Author

vicuna commented May 31, 2007

Comment author: @dbuenzli

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.

@vicuna
Copy link
Author

vicuna commented Jul 30, 2007

Comment author: berke

The command
ocamlbuild -tag thread -lib unix test.native
should do the job

@vicuna
Copy link
Author

vicuna commented Nov 26, 2007

Comment author: ertai

Thanks for the report. This is now fixed in the CVS (both in trunk and release310 branch).

@vicuna
Copy link
Author

vicuna commented Nov 16, 2008

Comment author: @dbuenzli

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.

Best,

Daniel

@vicuna
Copy link
Author

vicuna commented Apr 7, 2010

Comment author: @dbuenzli

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

@vicuna
Copy link
Author

vicuna commented Apr 7, 2010

Comment author: ertai

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.

@vicuna
Copy link
Author

vicuna commented Feb 20, 2017

Comment author: @xavierleroy

Un-assigning from xclerc

@vicuna
Copy link
Author

vicuna commented Feb 20, 2017

Comment author: @dbuenzli

I think this should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant