Open vbgl opened 5 years ago
I think it's a fair trade-off to require pkg-config. It's well-supported in the platforms I'm aware (OPAM, Nix) and other similar packages that bind to native require it.
Any historical reason why pkg-config
is just optional, @smimram / @toots ?
I can't think of any. This package is old and perhaps back in the days, pkg-config
wasn't as readily available as it is now? Also, on macos or cross-compiled conditions, it's better to fail when pkg-config
isn't present I believe b/c finding the right library to use is tricky.
The configuration script uses arbitrary defaults when calling
pkg-config
fails:https://github.com/savonet/ocaml-ssl/blob/0.5.9/src/config/discover.ml#L6
These defaults are wrong on some platforms.
What seems worse is that this fall-back is silent: one can successfully build this library and then get arcane linking failure when using it:
Possible fix: require pkg-config.