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 ignores relative-symlinked subdirectories or subdirectories with a trailing slash. #5395

Closed
vicuna opened this issue Nov 7, 2011 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Nov 7, 2011

Original bug ID: 5395
Reporter: lebotlan
Assigned to: @xclerc
Status: closed (set by @damiendoligez on 2015-03-27T15:29:07Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.2
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Related to: #6498
Monitored by: kdkeyser @jberdine

Bug description

The given archive is as follows:

  • inside A/, B2 is a relative symbolic link to B1
  • a.ml uses b.ml which is in A/B1/

Try the following commands :

(* Works as expected *)
rm -rf _build && ocamlbuild -I A/B1 A/a.cmo

(* Both commands unexpectedly produce an error. *)
rm -rf _build && ocamlbuild -I A/B1/ A/a.cmo
rm -rf _build && ocamlbuild -I A/B1/. A/a.cmo

(* And using the symbolic link just don't work. *)
rm -rf _build && ocamlbuild -I A/B2 A/a.cmo

Additional information

  • When the symbolic link is absolute instead of relative, it appears to work.

  • I have not been able to test with version 3.12

  • Could not find anything related in the documentation, wiki, or other bug reports.

File attachments

@vicuna
Copy link
Author

vicuna commented Jan 3, 2012

Comment author: @damiendoligez

This may be related to #4549 (being fixed).

@vicuna
Copy link
Author

vicuna commented Sep 20, 2012

Comment author: @damiendoligez

Not related to #4549 after all.

@vicuna
Copy link
Author

vicuna commented Mar 6, 2014

Comment author: kdkeyser

I've also run into this issue (using 4.01.0), took me quite a while to find a workaround.

I've got a project which uses a code generation tool that produces its output in a "target" directory. The idea was to symlink this directory to a src/ocaml/generated directory and make an mlpack, but compilation using ocamlbuild then fails due to this bug.

My current workaround is to symlink the individual files instead of the directory.

@vicuna
Copy link
Author

vicuna commented Mar 27, 2015

Comment author: @damiendoligez

Fixed in 4.02 branch (rev 15970).

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