Le 12/03/2014 17:06, Robert Lemmen a écrit : > I have zero knowledge of ocaml, but need to build it with changes as a > build dependency for something else I am experimenting with. doing that > I stumbled over something very puzzling, perhaps you could help me > understand it:
What changes? > debian/rules in ocaml (3.12.1) calls dh_ocaml, from the package dh-ocaml > on which it depends. so far so good. dh_ocaml, more specifically > /usr/bin/ocaml-md5sums, then calls ocamlobjinfo which is part of > ocaml-nox, but dh-ocaml does not depend on ocaml-nox. not a problem, I > can set OCAMLOBJINFO in the environment to the ocamlobjinfo which just > got built by ocaml itself. Did you try to use the existing package, and apply your changes there? > but the shebang line on that calls /usr/bin/ocamlrun, which again would > required ocaml installed. I can even get around that by setting > OCAMLOBJINFO to "<somepath>/ocamlrun <somepath>/ocamlobjinfo", > circumventing the shebang. > > but ocamlobjinfo seems to call /usr/lib/ocaml/objinfo_helper, which I > can't seem to find a way around. /usr/lib/ocaml is the location of the standard library, and it can be overridden with the OCAMLLIB environment variable (it is documented in the ocamlrun manpage). > so to me this looks a bit like dh-ocaml would need a dependency on > ocaml, which of course is terrible because of the chicken-and-egg > bootstrapping issue. But I do not understand how this can ever build in > the absence of ocaml on the build machine. what am I missing? As you figured out, dh-ocaml depending on ocaml would imply a build-dependency loop (ocaml build-depends on dh-ocaml...) for very little benefit. Indeed, in practice, they are always installed together (when dh_ocaml is called), except in the specific case of ocaml itself, where an existing ocaml installation would be useless anyway. Besides, there are other things in dh-ocaml, such as scripts for interacting with Alioth or the OCaml packaging policy and documentation, that are useful even if ocaml-nox is not installed. BTW, in ocaml's debian/rules, there is: > # Environment variable for dh_ocaml > export OCAMLOBJINFO = OCAMLLIB=tools boot/ocamlrun tools/objinfo Cheers, -- Stéphane -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

