Open fenginsc opened 6 months ago
Can you show the full error message (from the file in C:\Users\<your username>\AppData\Local\opam\log\ocaml-variants-7884-26640c.out
) ?
Otherwise I'm not sure what is the state of the pre 4.12 compilers in the temporary repositories. cc @dra27
If ocam2.2.0 is officially released is there no need for these third party repositories? Then it seems will be easier to install and use ocaml on windows in the future!
Yes, the work to make the default opam-repository compatible is ongoing and there will indeed be no need for external repositories once 2.2.0 is out.
Can you show the full error message (from the file in C:\Users\
\AppData\Local\opam\log\ocaml-variants-7884-26640c.out) ?
Yes, I uploaded the file directly since it is very long. ocaml-variants-7884-26640c.zip
../boot/ocamlrun ../boot/ocamlc -g -nostdlib -I ../boot -use-prims ../runtime/primitives -I .. -c -absname -w +a-4-9-41-42-44-45-48 -strict-sequence -warn-error A -principal -safe-string -strict-formats -bin-an not -I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../middle_end -I ../middle_end/closure -I ../middle_end/flambda -I ../middle_end/flambda/base_types -I ../driver -I ../toplevel -I ../file_formats -I ../lambda - ocamlmklibconfig.ml
File "C:\Users\fenginsc\AppData\Local\opam\ocaml.4.11.0\.opam-switch\build\ocaml-variants.4.11.0+mingw64\tools\ocamlmklibconfig.ml", line 1, characters 16-18:
1 | let bindir = "C:\Users\fenginsc\AppData\Local\opam\ocaml.4.11.0/bin"
^^
Error (warning 14): illegal backslash escape in string.
ah yes, that sounds like a bug in the configure script of the compiler that might have to be patched. I'm not sure if the plan to bring the compilers to opam-repository include patching OCaml < 4.12 though. In the first phase, I believe (I'm not sure though) that only 4.13 and up will be covered.
../boot/ocamlrun ../boot/ocamlc -g -nostdlib -I ../boot -use-prims ../runtime/primitives -I .. -c -absname -w +a-4-9-41-42-44-45-48 -strict-sequence -warn-error A -principal -safe-string -strict-formats -bin-an not -I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../middle_end -I ../middle_end/closure -I ../middle_end/flambda -I ../middle_end/flambda/base_types -I ../driver -I ../toplevel -I ../file_formats -I ../lambda - ocamlmklibconfig.ml File "C:\Users\fenginsc\AppData\Local\opam\ocaml.4.11.0\.opam-switch\build\ocaml-variants.4.11.0+mingw64\tools\ocamlmklibconfig.ml", line 1, characters 16-18: 1 | let bindir = "C:\Users\fenginsc\AppData\Local\opam\ocaml.4.11.0/bin" ^^ Error (warning 14): illegal backslash escape in string.
ah yes, that sounds like a bug in the configure script of the compiler that might have to be patched. I'm not sure if the plan to bring the compilers to opam-repository include patching OCaml < 4.12 though. In the first phase, I believe (I'm not sure though) that only 4.13 and up will be covered.
illegal backslash escape in string.
This error, if it is so common, I think it can be fixed uniformly, it should be unix-like system use /
, while windows use \
cause, now how do I manually fix this error, try to see if it can be compiled properly?
Not the most helpful of answers for now, but:
I'm trying to use the latest opam 2.2.0 beta1 and have successfully installed ocaml 5.0.0 and ocaml 5.1.0. The repository
https://github.com/dra27/opam-repository#windows-5.0
is used. I also tried using thehttps://github.com/fdopen/opam-repository-mingw.git#opam2
repository and successfully compiled and installed ocaml version 4.12.0 - 4.14.0. But I failed to compile and install an older version of ocaml 4.11.0, is this normal? Or am I missing some installation dependency?>opam switch create ocaml.4.11.0 --package=ocaml-variants.4.11.0+mingw64
If opam 2.2.0 is officially released is there no need for these third party repositories? Then it seems will be easier to install and use ocaml on windows in the future!