Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem with end-on-line convention on bytecomp/bytelink.ml #4940
Original bug ID: 4940
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
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.
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.
Comment author: @damiendoligez
We do not use Mac end-of-lines for OCaml sources. In fact, there isn't a single occurrence of CR in
What probably happens is this:
The short-term solution is to terminate the lines of bytelink.ml with \n, the long-term solution
We have made the change to bytelink.ml for 3.11.2+rc1, we'll do the rest for 3.12.