You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4940 Reporter:@alainfrisch Assigned to:@damiendoligez Status: closed (set by @damiendoligez on 2009-12-30T15:40:36Z) Resolution: fixed Priority: normal Severity: minor Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general)
Bug description
When using "ocamlc -output-obj" with a recent version of OCaml compiled from the branch version/3.11 of the SVN, using the Win32 MSVC port, I get errors like:
csml_bytecode.c : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
File "none", line 1, characters 0-1:
Error: Error while building custom runtime system
The culprit is very probably some non-Unix end-of-lines in the file bytelink.ml, in parts that generate literal C code. Applying the dos2unix tool to bytelink.ml solves the problem.
Possible fixes:
do not use Mac end-of-lines for OCaml sources;
or:
do not insert end-of-lines in literal strings (instead, terminate lines with \n).
Btw, we also have to apply dos2unix to the file VERSION to be able to compile OCaml (but this is not new).
FWIW, we use the "DOS / text" install mode of Cygwin, not the "Unix / binary" mode.
The text was updated successfully, but these errors were encountered:
We do not use Mac end-of-lines for OCaml sources. In fact, there isn't a single occurrence of CR in
the whole source tree.
What probably happens is this:
there are end-of-lines in literal strings
they are translated by your Cygwin into CR-LF when OCaml reads and compiles the source,
so the string contains CR-LF
when the compiler outputs them as CR-LF, your cygwin again translates the LF into CR-LF,
resulting in CR-CR-LF in the output file.
The short-term solution is to terminate the lines of bytelink.ml with \n, the long-term solution
is to do that for all compiler source files, and to add a warning for naked end-of-lines in string
constants.
We have made the change to bytelink.ml for 3.11.2+rc1, we'll do the rest for 3.12.
Original bug ID: 4940
Reporter: @alainfrisch
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2009-12-30T15:40:36Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Bug description
When using "ocamlc -output-obj" with a recent version of OCaml compiled from the branch version/3.11 of the SVN, using the Win32 MSVC port, I get errors like:
csml_bytecode.c : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
File "none", line 1, characters 0-1:
Error: Error while building custom runtime system
The culprit is very probably some non-Unix end-of-lines in the file bytelink.ml, in parts that generate literal C code. Applying the dos2unix tool to bytelink.ml solves the problem.
Possible fixes:
or:
Btw, we also have to apply dos2unix to the file VERSION to be able to compile OCaml (but this is not new).
FWIW, we use the "DOS / text" install mode of Cygwin, not the "Unix / binary" mode.
The text was updated successfully, but these errors were encountered: