| Anonymous | Login | Signup for a new account | 2013-05-20 06:05 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0005611 | OCaml | OCaml general | public | 2012-05-10 08:40 | 2012-09-21 14:17 | |||||||
| Reporter | guesdon | |||||||||||
| Assigned To | meyer | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 4.00.0+dev | |||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | 4.01.0+dev | |||||||||
| Summary | 0005611: Fatal error: exception End_of_file when using -o file.cmo | |||||||||||
| Description | Giving a .cmo file to -o option of ocamlc without -c ends with a fatal error. | |||||||||||
| Steps To Reproduce | # ocamlc -v The OCaml compiler, version 4.00.0+dev17_2012-05-02 Standard library directory: /opt/ocaml-4/lib/ocaml # cat > t.ml let x = 1;; # ocamlc -o t.cmo t.ml Fatal error: exception End_of_file But the following works: # ocamlc -c -o t.cmo t.ml # ocamlc -o t.x t.ml | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0007669) doligez (manager) 2012-07-09 15:03 |
This works too: # ocamlc -o x.cmo t.ml My guess: when you say "ocamlc -o t.cmo t.ml", the compiler first compiles t.ml to t.cmo, then tries to link the t.cmo object file to produce an executable named t.cmo. At some point, it opens t.cmo for writing (thus erasing it), then tries to copy data from t.cmo to t.cmo, which fails. I think we need a better error message. In the meantime, the workaround is obvious: don't do that. Also, I have no idea how it could work in 3.12.1... |
|
(0007994) meyer (developer) 2012-09-01 15:11 |
Improved error message to avoid clashes: r12901 |
|
(0008138) doligez (manager) 2012-09-21 14:17 |
r 12901 (in trunk) fixes this. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-10 08:40 | guesdon | New Issue | |
| 2012-05-10 16:14 | meyer | Assigned To | => meyer |
| 2012-05-10 16:14 | meyer | Status | new => assigned |
| 2012-07-09 15:03 | doligez | Note Added: 0007669 | |
| 2012-07-09 15:03 | 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-01 15:11 | meyer | Note Added: 0007994 | |
| 2012-09-21 14:17 | doligez | Note Added: 0008138 | |
| 2012-09-21 14:17 | doligez | Status | assigned => resolved |
| 2012-09-21 14:17 | doligez | Resolution | open => fixed |
| 2012-09-21 14:17 | doligez | Fixed in Version | => 4.01.0+dev |
| 2012-09-21 14:17 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |