Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005532OCamlOCaml runtime systempublic2012-03-09 21:292012-05-31 14:45
Reporteredmcman 
Assigned Tomeyer 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.12.0 
Target VersionFixed in Version 
Summary0005532: ocamlrun requires a period in the filename, else it produces a misleading error message
Descriptionocamlrun refuses to run bytecode files with no period in the filename. Instead, it prints "Fatal error: the file <filename> is not a bytecode executable file", which is not necessarily true.
Steps To Reproduceedmcman@joethecat:~/ocaml-3.12.0$ ocamlc test.ml -o test
edmcman@joethecat:~/ocaml-3.12.0$ ocamlrun test
Fatal error: the file test is not a bytecode executable file
edmcman@joethecat:~/ocaml-3.12.0$ mv test test.
edmcman@joethecat:~/ocaml-3.12.0$ ocamlrun test.
edmcman@joethecat:~/ocaml-3.12.0$
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007035)
meyer (developer)
2012-03-10 01:48

Hi,

It's not about period in the filename. Your file name seems to be a legitimate non-ocaml bytecode file found on path. It clashes on my machine with Linux /usr/bin/test. If you try ocamlrun ./test it will work.

It's documented under:
http://caml.inria.fr/pub/docs/manual-ocaml/manual024.html [^]

I'm closing this PR, since it's not a bug.
(0007036)
meyer (developer)
2012-03-10 01:50

In fact, the improvement would to print out the full path to a file in the error message. I think this possibility is worth investigating.
(0007037)
meyer (developer)
2012-03-10 02:57

Error message improved in r12215.
(0007040)
edmcman (reporter)
2012-03-10 15:29

Thanks, I think improving the error message is a good way to prevent such confusion!

- Issue History
Date Modified Username Field Change
2012-03-09 21:29 edmcman New Issue
2012-03-10 01:48 meyer Note Added: 0007035
2012-03-10 01:48 meyer Assigned To => meyer
2012-03-10 01:48 meyer Status new => assigned
2012-03-10 01:49 meyer Status assigned => closed
2012-03-10 01:49 meyer Resolution open => fixed
2012-03-10 01:50 meyer Note Added: 0007036
2012-03-10 01:50 meyer Status closed => feedback
2012-03-10 01:50 meyer Resolution fixed => reopened
2012-03-10 02:57 meyer Note Added: 0007037
2012-03-10 02:58 meyer Status feedback => resolved
2012-03-10 02:58 meyer Resolution reopened => fixed
2012-03-10 15:29 edmcman Note Added: 0007040
2012-05-31 14:45 doligez Severity minor => feature


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker