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

vicuna opened this issue Nov 7, 2011 · 4 comments


None yet
1 participant
Copy link

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
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
  • uses 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


This comment has been minimized.

Copy link

commented Jan 3, 2012

Comment author: @damiendoligez

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


This comment has been minimized.

Copy link

commented Sep 20, 2012

Comment author: @damiendoligez

Not related to #4549 after all.


This comment has been minimized.

Copy link

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.


This comment has been minimized.

Copy link

commented Mar 27, 2015

Comment author: @damiendoligez

Fixed in 4.02 branch (rev 15970).

@vicuna vicuna closed this Mar 27, 2015

@vicuna vicuna added the ocamlbuild label Mar 14, 2019

@vicuna vicuna added this to the 4.02.2 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.