luv icon indicating copy to clipboard operation
luv copied to clipboard

Avoid carriage return bug when configuring libuv on Windows

Open tobil4sk opened this issue 10 months ago • 1 comments

Carriage returns will appear when running the command on windows, which means that the configure script cannot function correctly because it relies on the host value to locate certain executables (such as ar).

This is actually the cause of #162. Fixing this doesn't completely solve (local) windows builds, as dune doesn't currently run the correct bash executable, see: https://github.com/ocaml/dune/issues/11438. This can be worked around by adding the output of $(opam exec -- cygpath -w /bin) to PATH.

Alternatively, this could all be replaced with ocamlc -config-var host which is cleaner, but that would increase the required ocaml version to 4.08. What would your preference be? @aantron

tobil4sk avatar Feb 03 '25 19:02 tobil4sk

Alternatively, this could all be replaced with ocamlc -config-var host which is cleaner

I've changed it to the built-in dune variable ocaml-config:host, which is available from dune 2.0 and is even cleaner.

tobil4sk avatar Feb 04 '25 13:02 tobil4sk