New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sanitize.sh has windows style end-of-lines (mingw) #5338
Comments
Comment author: @alainfrisch I cannot reproduce the bug. Can you provide more information? Which version of Cygwin do you use? |
Comment author: matt I just tried again. This is from a VM that i installed with a fresh cygwin this summer. I'm using OCaml 3.12.1, but it is not a stock one: $ ocamlc -config In case of doubt, I'm going to attach my two patches (flexdll, and OCaml's Makefile). I hope I did not let you loose your time for a mistake from mine. Salutations |
Comment author: @alainfrisch If you find the time to do so, could you test with flexdll 0.27 and the OCaml trunk? If the problem remains, can you copy here the error message? |
Comment author: matt Sure. It is on my TODO list. |
Comment author: matt I just started from scratch with a fresh computer
Then compiled mingw flavor, following the README.win32 instructions. After that, I did: $ mkdir test $ _build/sanitize.sh $ sed -i -e 's/\r\n/\n/g' _build/sanitize.sh (This time, it works) $ _build/sanitize.sh |
Comment author: @alainfrisch Thanks! Do you think you could come up with a patch? Ideally, ocamlbuild should be adapted to produce "sanitize" scripts which are usable from cygwin. |
Comment author: matt I think so. I had a look : in hygiene.ml, l153, oc is opened with Open_text flag. |
Comment author: matt Here is it. I just replaced Open_text with Open_binary. It works with cygwin. I think it will not make any difference on unix? I do not know about OSX. |
Comment author: @alainfrisch Thanks. I've applied the patch. I think one needs to bootstrap ocamlbuild to have the patch take effect (i.e. replace boot/myocamlbuild.boot). Do you know how to do that? |
Comment author: matt No idea. To be sure, I tested by recompiling everything (including bootstrap). When I came back, some time later, the generated sanitize.sh was working right. |
Comment author: @alainfrisch Unfortunately, 'make bootstrap' does not seem to update boot/myocamlbuild.boot. |
Comment author: @lefessan It looks like you have to run this script: "build/myocamlbuild.sh" from ocaml top directory (grep told me that it is the only file that can update myocamlbuild.boot...). |
Comment author: @alainfrisch Thanks! (For the records, this script requires ocaml to be installed (make install) first, and the installed version to be first in PATH.) |
Original bug ID: 5338
Reporter: matt
Assigned to: @alainfrisch
Status: closed (set by @alainfrisch on 2011-12-14T08:27:00Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.1
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Bug description
This prevents sanitize.sh to be executed from cygwin, before a dos to unix end-of-line conversion.
File attachments
The text was updated successfully, but these errors were encountered: