Expected Behavior
Luv vendors libuv, and installs libuv's header uv.h at lib/luv/uv.h using an install stanza (see also #3907 about this stanza).
When a project that depends on package luv is compiled, Dune correctly passes -I path/to/switch/lib/luv when compiling the project's C files, which allows them to pull in uv.h with #include <uv.h>.
I recently added package luv_unix to the Luv repo (in branch unix), which depends on luv and needs uv.h. After pinning everything, doing
opam install luv
opam install luv_unix
works, because the package installations are separate, and uv.h is in the switch by the time luv_unix is installed.
The expected behavior is that during development,
or some variation on it, should also work. luv_unix should be able to find uv.h.
Actual Behavior
$ dune build
gcc src/unix/luv_unix.o (exit 1)
luv_unix.c:9:10: fatal error: uv.h: No such file or directory
9 | #include <uv.h>
| ^~~~~~
compilation terminated.
This can be seen immediately in Travis logs. The command failing there is trying to build Luv's tester, which in branch unix depends on luv_unix.
Reproduction
opam pin add luv https://github.com/aantron/luv.git#unix
opam pin add luv_unix https://github.com/aantron/luv.git#unix
opam install luv luv_unix
opam remove luv luv_unix
git clone https://github.com/aantron/luv.git
cd luv
make test # or dune build -p luv,luv_unix, etc.
Specifications
- Version of
dune (output of dune --version): 2.8.1
- Version of
ocaml (output of ocamlc --version): 4.11.1
- Operating system (distribution and version): Ubuntu 20.04 on WSL1
Expected Behavior
Luv vendors libuv, and installs libuv's header
uv.hatlib/luv/uv.husing aninstallstanza (see also #3907 about this stanza).When a project that depends on package
luvis compiled, Dune correctly passes-I path/to/switch/lib/luvwhen compiling the project's C files, which allows them to pull inuv.hwith#include <uv.h>.I recently added package
luv_unixto the Luv repo (in branchunix), which depends onluvand needsuv.h. After pinning everything, doingworks, because the package installations are separate, and
uv.his in the switch by the timeluv_unixis installed.The expected behavior is that during development,
or some variation on it, should also work.
luv_unixshould be able to finduv.h.Actual Behavior
This can be seen immediately in Travis logs. The command failing there is trying to build Luv's tester, which in branch
unixdepends onluv_unix.Reproduction
Specifications
dune(output ofdune --version): 2.8.1ocaml(output ofocamlc --version): 4.11.1