Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005503OCamlOCamlbuild (the tool)public2012-02-09 10:372015-12-11 19:19
ReporterHendrik Tews 
Assigned Toxclerc 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version3.13.0+dev 
Summary0005503: fatal error with absolute -build-dir
Descriptionocamlbuild uses wrong filename concatenation when it tries to open the _digest file. It therefore dies with a Sys_error when given an absolute build dir.
Steps To Reproducetouch
ocamlbuild -build-dir /tmp/x t.byte

this dies with

Fatal error: exception Sys_error("/tmp//tmp/x/_digests: No such file or directory")

because it does

open("/tmp//tmp/x/_digests", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 ENOENT (No such file or directory)
Additional InformationThe bug is also present in 3.13.0+dev11 (2012-01-26)
TagsNo tags attached.
Attached Filesdiff file icon pr-5503.diff [^] (518 bytes) 2012-02-25 18:31 [Show Content]

- Relationships
has duplicate 0004502closedgasche Ocamlbuild finds erroneous sanitization errors when using the -build-dir option 

-  Notes
xclerc (reporter)
2012-02-15 10:12

Tentative fix in trunk by commit 12154.
Could you confirm it fixes the issue on your machine?
jm (reporter)
2012-02-21 02:18

the current fix breaks builds not giving -build-dir;
as ocamlbuild tries to write in _build/_build/:

+ ocamlfind ocamlc -where > _build/ocamlc.where
/bin/sh: cannot create _build/ocamlc.where: Directory nonexistent
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
Fatal error: exception Sys_error("_build/_digests: No such file or directory")
avsm (reporter)
2012-02-25 18:34

I fixed it with the attached one-liner in pr-5503.diff, which seems to work both with and without a build-dir specified.
doligez (administrator)
2012-03-05 17:37

Fixed in trunk (commit 12191).

Hopefully, this fix will work with all combinations (without -build, with -build relative, with -build absolute).

The fix is actually from Xavier, I'm the committer for technical reasons.

- Issue History
Date Modified Username Field Change
2012-02-09 10:37 Hendrik Tews New Issue
2012-02-15 10:12 xclerc Note Added: 0006924
2012-02-15 10:12 xclerc Assigned To => xclerc
2012-02-15 10:12 xclerc Status new => feedback
2012-02-21 02:18 jm Note Added: 0006949
2012-02-25 18:31 avsm File Added: pr-5503.diff
2012-02-25 18:34 avsm Note Added: 0006969
2012-03-05 17:37 doligez Note Added: 0007001
2012-03-05 17:37 doligez Status feedback => resolved
2012-03-05 17:37 doligez Resolution open => fixed
2012-03-05 17:37 doligez Fixed in Version => 3.13.0+dev
2013-06-17 15:22 gasche Relationship added has duplicate 0004502
2015-12-11 19:19 xleroy Status resolved => closed

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker