Achim Gratz wrote:
> Brian Inglis writes:
> >>> Cygwin packages are granular and dependencies are functional: which
> >>> of the Cygwin packages opam and opam-installer uses Cygwin package
> >>> ocaml- compiler-libs, or does opam use another ocaml package to build?
> 
> >> I don't quite understand your question - opam is OCaml's package
> manager.
> 
> The question was if adding ocaml-compiler-libs to the opam requirements is
> sufficient or if there are other packages that need to be added as
> requirements for opam.  A second related question is if any of the
> existing ocaml packages are missing dependencies, especially to ocaml-
> compiler-libs.  Finally, since opam is split into two packages on Cygwin,
> which of these needs the requirement.

Indeed, adding ocaml-compiler-libs as a dependency of opam is sufficient 
(opam-installer does not in any way depend on it). The rest of opam's non-build 
dependencies were dealt with in 2018 (see 
https://github.com/andyli/opam-cygwin/blame/master/opam.cygport#L22-L23 and the 
linked https://sourceware.org/legacy-ml/cygwin/2018-01/msg00079.html).

> >> It can either compile OCaml itself from sources or use the OCaml
> >> installed by the system's package manager. In the second case, it
> >> quite reasonably assumes that the OCaml which has been installed is
> >> the one the OCaml developers intended which includes its
> >> compiler-libs package. Given that opam depends on ocaml, it should
> >> also depend on ocaml-compiler-libs, therefore.
> >
> > What you or the ocaml developers assume does not matter: what matters
> > is how the package works. If you do not understand the question and
> > can not provide the answer, I can see why the maintainer made his
> > choice: he probably never used the packages, just ran any tests
> included.
> 
> That sounds unnecessarily harsh to me.  It would however be helpful if the
> opam maintainer could have a look, since he is undoubtedly much more aware
> of the issues on both the OCaml and Cygwin sides than any one of us and
> could probably explain why the packages are built the way they are.

The dependencies were modified before so that `opam init` succeeds without it 
being:

- install Cygwin's opam package
- Run opam init
- <sigh>, re-run Cygwin setup and install a load more Cygwin packages
- Run opam init again

The additional dependency ensures that the next command many users would then 
run `opam install ocamlfind` also succeeds.

> > It appears that neither ocaml nor opam use ocaml-compiler-libs,
> > otherwise the cygwin build and packaging software would include it, so
> > which package in the ocaml suite actually binds the
> > ocaml-compiler-libs to do its job, or does that package just provide
> > dynamic libraries which are expected to be present when anyone runs
> ocaml programs?
> > In which case users would be expected to manually install the package
> > ocaml-compiler-libs.
> 
> It's not uncommon that these captive "package managers" assume a certain
> environment without depending directly on it, so you'll indeed have to
> manually add the pre-requisites as manual requirements for the Cygwin
> package.  That doesn't solve the problem that usually language
> environments that come with their own package manage don't quite play nice
> with the system package manager, especially if the system is not
> GNU/Linux.

We do our best - the opam developers use a mix of FreeBSD/OpenBSD/macOS/Windows 
& Debian, so we try to remain accommodating by design :)

Thanks,


David 
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to