[opam-devel] OPAM + Docker
ygrek
ygrek at autistici.org
Tue Nov 19 09:50:37 GMT 2013
On Tue, 19 Nov 2013 10:12:20 +0100
Nicolas Braud-Santoni <nicolas at braud-santoni.eu> wrote:
> > I personally dislike this depexts field to mention OS packages at all.
> Why ?
> This seems to be the most sane and generic option if we wish to interact
> with the system's package manager [0].
It is a subjective feeling. Per your request I am trying to rationalize it below %)
Logically, because this is one step missed in the chain of dependencies. OCaml library doesn't depend on system package,
it depends on shared object and (usually) header files. This information (that library author
is fully aware of) is trustworthy and pretty precise, and worth recording because it is a useful bit of information
in any environment (that you cannot envision beforehand). The mapping of files to system packages is the job of system package manager.
> Not all package managers provide these kind of facilities.
> That is someting that, for instance, will not exist in any source-based
> distribution that I am aware of.
So what does a gentoo user do when trying to compile some third-party code and finding that libxxx.so is missing?
How do they find the gentoo package that will provide this .so?
> Moreover, it seems unwise to fill in information that ought to belong in
> the distribution's packages :
> if I depend on libfoo, major version 1, any minor version, should
> I specify “libfoo-1.so”, “libfoo-1(.\d+)*.so” (dots implicitly
> escaped), or some crazier scheme ?
> Where will I look for the .so ?
> (And while using pkg-config is better, it still isn't supported by all
> external dependencies)
I think providing library name without ABI versions is good enough.
And you don't look for .so, ldconfig does..
> > If apt-file is not present it is at least possible to tell (with dpkg -S or ldconfig -p) whether the .so is present and what is
> > precisely needed for the build to succeed (and mention how to find the needed package manually).
> Don't the conf-* packages already achieve this (in an hackish way) ?
I, as a code author, know which library I am linking with (because I hardcode it's name in Makefile), but I don't have
a slightest idea how the package for that library will be called in some ObscureBSD. So I cannot actually fill any correct value
in depexts. On the other hand the user of ObscureBSD compiling my library will be able to find a correct package given the
correct clue from opam - that it will need specific .so and .h files installed.
> > It may be even possible to gater information about .so files automatically - by inspecting generated cmxa and cma
> > files with ocamlobjinfo - so it can be done by ocamlot or something like that.
> How would you get them to build in the first place ?
You got me here %)
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.ocaml.org/pipermail/opam-devel/attachments/20131119/624567aa/attachment.sig>
More information about the opam-devel
mailing list