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 creates link for some files in .itarget #5305
Comments
Comment author: Dmitry Grebeniuk As I see now, the problem is not in the created symlinks, but in the way the ocamlbuild determines whether the directory is dirty. For example, in a slightly modified example the .byte and .native files are handled as "clean" (look at the list with "Leftover Ocaml compilation files"): $ ls -lab $ ocamlbuild a.otarget $ |
Comment author: Dmitry Grebeniuk I've found this bug while installing "batteries": "make install" failed after "make all". |
Comment author: elehack Passing -no-links to ocamlbuild serves as a workround for this bug, and that is what we are currently doing in the Batteries sources. |
Comment author: @lefessan ocamlbuild won't complain anymore about remaining links to the _build/ directory. |
Original bug ID: 5305
Reporter: Dmitry Grebeniuk
Assigned to: @lefessan
Status: closed (set by @xavierleroy on 2015-12-11T18:04:36Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.12.1+dev
Fixed in version: 4.00.0+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @ygrek
Bug description
ocamlbuild creates links for .cm{i,o,a,xa,xs}-files in current directory and then complains that the directory is dirty:
$ ocamlc -version
3.12.1+rc1
$ ls -lab
total 16
drwxr-xr-x 2 gds gds 4096 Jun 29 13:14 .
drwxrwxrwt 23 root root 4096 Jun 29 13:09 ..
-rw-r--r-- 1 gds gds 6 Jun 29 13:08 a.itarget
-rw-r--r-- 1 gds gds 28 Jun 29 13:03 a.ml
$ cat a.itarget
a.cma
$ cat a.ml
let () = print_string "q\n"
$ ocamlbuild a.otarget
Finished, 4 targets (0 cached) in 00:00:00.
$ ls -lab
total 20
drwxr-xr-x 3 gds gds 4096 Jun 29 13:15 .
drwxrwxrwt 23 root root 4096 Jun 29 13:09 ..
drwxr-xr-x 2 gds gds 4096 Jun 29 13:15 _build
lrwxrwxrwx 1 gds gds 12 Jun 29 13:15 a.cma -> _build/a.cma
-rw-r--r-- 1 gds gds 6 Jun 29 13:08 a.itarget
-rw-r--r-- 1 gds gds 28 Jun 29 13:03 a.ml
$ ocamlbuild a.otarget
SANITIZE: a total of 1 file that should probably not be in your source tree
has been found. A script shell file "_build/sanitize.sh" is being created.
Check this script and run it to remove unwanted files or use other options
(such as defining hygiene exceptions or using the -no-hygiene option).
IMPORTANT: I cannot work with leftover compiled files.
ERROR: Leftover Ocaml compilation files:
File a.cma in . has suffix .cma
Exiting due to hygiene violations.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.
$
The text was updated successfully, but these errors were encountered: