Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005593OCamlOCaml generalpublic2012-04-16 17:142013-08-31 12:49
Assigned Tofrisch 
PrioritylowSeveritytweakReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005593: -output-obj leaves a C file in case of Reference to undefined global
DescriptionConsider a file with a reference to Unix.

The following command line fails as expected:

$ ocamlc -output-obj -o a.c a.cmo
File "_none_", line 1, characters 0-1:
Error: Error while linking a.cmo:
Reference to undefined global `Unix'

But it leaves an incomplete file a.c. This is annoying because if one then fixes the command-line, the compiler refuses to overwrite this file:

$ ocamlc -output-obj -o a.c unix.cma a.cmo
File "_none_", line 1, characters 0-1:
Error: Cannot overwrite existing file a.c

I suggest to have "ocamlc -output-obj" removes its output in case of a linking error.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
frisch (developer)
2012-04-16 17:26
edited on: 2012-04-16 17:27

Fixed in trunk (commit 12356) and 4.00 (commit 12357).

- Issue History
Date Modified Username Field Change
2012-04-16 17:14 frisch New Issue
2012-04-16 17:21 frisch Assigned To => frisch
2012-04-16 17:21 frisch Status new => assigned
2012-04-16 17:26 frisch Note Added: 0007359
2012-04-16 17:27 frisch Note Edited: 0007359 View Revisions
2012-04-16 17:28 frisch Status assigned => resolved
2012-04-16 17:28 frisch Resolution open => fixed
2013-08-31 12:49 xleroy Status resolved => closed

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker