Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005532OCamlruntime system and C interfacepublic2012-03-09 21:292015-12-11 19:04
Assigned Tomeyer 
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 -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.
TagsNo tags attached.
Attached Files

- Relationships

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


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: [^]

I'm closing this PR, since it's not a bug.
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.
meyer (developer)
2012-03-10 02:57

Error message improved in r12215.
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
2015-12-11 19:04 xleroy Status resolved => closed
2017-02-23 16:43 doligez Category OCaml runtime system => runtime system
2017-03-03 17:45 doligez Category runtime system => runtime system and C interface

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker