Drup / ocaml-lmdb

Ocaml bindings for lmdb.
https://drup.github.io/ocaml-lmdb/dev/
MIT License
48 stars 3 forks source link

Non-declared dependency on conf-pkg-config #41

Open balsoft opened 2 years ago

balsoft commented 2 years ago

lmdb implicitly (via dune-configurator) uses (at least on Linux) pkg-config to discover lmdb.h. However, this dependency is not explicitly defined in depexts. This means that if pkg-config happens to not be present, the lmdb package can't build.

Error is as follows:

File "dune", line 6, characters 0-70:
6 | (rule
7 |  (targets cflags.sexp clibs.sexp)
8 |  (action (run ./discover.bc)))
(cd _build/default && ./discover.bc)
which: pkg-config
-> not found
Fatal error: exception Failure("lmdb.h not found")

With pkg-config installed, the package seems to build correctly.

balsoft commented 2 years ago

Ah, after looking at the definition more closely, it seems that there is a fallback in case pkg-config is not present. I'm now wondering if there's a way to express this using opam.

madroach commented 1 year ago

You think there should be a dependency on conf-pkg-config ?