Skip to content
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

Avoid carriage return bug when configuring libuv on Windows #165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tobil4sk
Copy link
Contributor

@tobil4sk tobil4sk commented Feb 3, 2025

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: ocaml/dune#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

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`).
@tobil4sk
Copy link
Contributor Author

tobil4sk commented Feb 4, 2025

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 tobil4sk changed the title Handle carriage returns from ocamlc -config output Avoid carriage return bug when configuring libuv on Windows Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant