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

Use autotools instead of GYP to build libuv; works on Windows #45

Merged
merged 2 commits into from
Mar 11, 2020

Conversation

aantron
Copy link
Owner

@aantron aantron commented Mar 11, 2020

This eliminates the Python 3 dependency. Also, GYP was generating projects for Xcode on Mac, Visual Studio on Windows, etc. The new autotools build just directly uses whatever C compiler is being used by OCaml, which is guaranteed to already be installed and compatible.

The output of autotools is committed into the repo, so Luv doesn't pick up any new deps, either. It just depends on ordinary binaries like bash, make, etc. These are present in all environments commonly used with OCaml, including esy on Windows.

The libuv part of the build in this PR already works on Windows, with opam-repository-mingw. I still have two more things to do to finish Windows support:

  1. Fix some of the code on the Luv side, along these lines, as found by @bryphe. I might cherry-pick over those patches :)
  2. Test the build in esy. I haven't yet been able to get esy working outside WSL on my machine. I'm currently stuck on Race condition in esy-build-package? esy/esy#875 (comment).

I'll probably try GitHub Actions before doing these, for a Windows build in CI.

Closes #31.
Closes #43.
Also relevant to #40.

libuv itself is going to drop GYP soon. See libuv/libuv#2682.

cc @jordwalke @prometheansacrifice @ulrikstrid @lessp

@aantron aantron added this to the 0.5.1 milestone Mar 11, 2020
@aantron
Copy link
Owner Author

aantron commented Mar 11, 2020

This should also work nicely on musl switches in opam and the like, since, again, it queries the OCaml installation for the C compiler to use.

@aantron
Copy link
Owner Author

aantron commented Mar 11, 2020

Test the build in esy

To clarify, the build already works with esy on Unix-like systems. This is about testing with esy on Windows.

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.

Build failure on Windows + esy (python3 not available) Mac: make Xcode optional for building libuv
1 participant