Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005250OCamlOCaml generalpublic2011-04-07 16:022013-07-12 18:15
Reporterslindley 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.12.0 
Target Version4.01.1+devFixed in Version 
Summary0005250: ocamlrun gets confused on cygwin if the name of the supplied bytecode file clashes with another file in the path
DescriptionSuppose 'foo' is a bytecode file, and a different file 'foo' is in the path, then we get the following behaviour:

  $ ocamlrun foo
  Fatal error: the file foo is not a bytecode executable file

whereas:

  $ ocamlrun ./foo

works as expected.

If the genuine 'foo' is accessible from PATH, and the bogus 'foo' is a directory that is accessible earlier in PATH, then we get a more informative error message by invoking the genuine 'foo' directly:

  $ foo
  /path/to/bogus/foo not found or is not a bytecode executable file

Again:

  $ ./foo

works as expected.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0008127)
doligez (administrator)
2012-09-20 15:36

The first case also occurs under Mac OS X, although 4.00.0 gives the better error message.

Possible solution: add a "-" command-line flag to ocamlrun that says the rest of the command line is bytecode+arguments, and don't look for the bytecode in the path.

Another possible solution: add a "-path" flag to tell ocamlrun to look for the bytecode in the PATH (and don't do it by default), and use that option in the header of executable bytecode files.

- Issue History
Date Modified Username Field Change
2011-04-07 16:02 slindley New Issue
2011-05-02 12:53 doligez Status new => acknowledged
2012-07-10 15:14 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-20 15:36 doligez Note Added: 0008127
2012-09-20 15:36 doligez Target Version 4.00.1+dev => 4.00.2+dev
2013-07-11 16:09 doligez Target Version 4.00.2+dev => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker