Mentions légales du service

Skip to content

avoid ocamlfind-related issues with '\r' on Cygwin

Andre Maroneze requested to merge fix-configure-windows into master

When trying to install why3 on a Cygwin+MinGW system, the configure step fails with errors such as:

# checking for ocamlfind... ocamlfind
# but your ocamlfind is not compatible with your ocamlc:
, ocamlc: C:/OCaml64/home/user/.opam/4.14.0+mingw64c/lib/ocamlaml
# configure: error: cannot use ocamlfind.

The cause of that weird message is the fact that ocamlfind uses \r\n on such systems, so commands such as:

  OCAMLFINDLIB=$(ocamlfind printconf stdlib)

Include the \r in the variable, leading to comparison failures that abort the installation.

This happens in about 20 places, mostly calls to ocamlfind query.

I found out that by adding that set -o igncr option to the configure script, it works on my setup. Otherwise, I had to add a | tr -d '\r' to each occurrence of ocamlfind query, ocamlfind printconf, etc.

Edited by Andre Maroneze

Merge request reports