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

Build error: luv_unix cannot find uv.h #108

Closed
zbaylin opened this issue May 4, 2021 · 5 comments
Closed

Build error: luv_unix cannot find uv.h #108

zbaylin opened this issue May 4, 2021 · 5 comments

Comments

@zbaylin
Copy link

zbaylin commented May 4, 2021

OS: macOS 11

Problem: I try building luv_unix with dune build -p luv,luv_unix and I get the following error:

luv_unix.c:9:10: fatal error: 'uv.h' file not found
#include <uv.h>
         ^~~~~~

I assume this is because the INCLUDE_PATH is not setup properly for luv_unix, unlike luv.c.

@aantron
Copy link
Owner

aantron commented May 4, 2021

It is most likely an instance of ocaml/dune#4121, an upstream bug I reported to Dune, and is the reason I was delaying merging luv_unix.

Try working around it by installing a system-wide libuv (from Homebrew?), then removing it when done developing.

The CI is probably going to be pretty broken because of this. I'll look into seeing how far it can be fixed today. If you get the build working locally (it works for me), don't worry about fixing the CI — I'll take care of it asychronously.

@aantron
Copy link
Owner

aantron commented May 4, 2021

(You can fully verify that it's due to ocaml/dune#4121 by following the repro instructions in the issue; all the opam commands before git clone are about showing that the setup works outside of a monorepo, and Dune only starts doing the wrong thing with include paths for sibling local packages.)

EDIT: this check should be done without a Homebrew libuv installed.

@zbaylin
Copy link
Author

zbaylin commented May 4, 2021

@aantron Ah that makes sense. Installing the system header works for now -- I'll let you decide if this should remain open or if it should be closed since the issue is with dune rather than luv.

Thanks!

@aantron
Copy link
Owner

aantron commented May 4, 2021

Great :) I'll leave it open as a reminder in this repo, that there is still an issue to address.

@aantron
Copy link
Owner

aantron commented Dec 22, 2023

I worked around this in 150c305.

@aantron aantron closed this as completed Dec 22, 2023
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

No branches or pull requests

2 participants