[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: OCaml and static linking (was old thread: Re: [Fedora-packaging] Issues with Ocaml and Static Linking)

David Woodhouse wrote:
On Sat, 2007-05-19 at 17:36 +0100, Richard W.M. Jones wrote:
I suspect it's unlikely that upstream will do (a), ever. There's a technical issue. OCaml really doesn't have a concept of an ABI. It does a kind of whole-program optimisation where even changes to the internal implementation of a library can affect the resulting binary. Moreover even if you "fixed" that, any change whatsoever to the library's signature or the version of compiler it was built with (even bugfix releases which have the same version number) will make the library incompatible.

Our current package scheme doesn't handle this at all, does it? Should
our ocaml-*-devel packages have runtime Requires: on the precise n-v-r
of ocaml used to build them?

Yes definitely. In fact any other behaviour is broken. (All packages should have this Requires -- I'm not sure why you elected for just the -devel packages). Furthermore, if one library or program depends on another library, then it must contain a dependency on the precise n-v-r of the library.

The only reason I didn't do it for the four packages I just put up for review is that I couldn't work out _how_ to do it in the spec file :-(

[My packages for review: http://tinyurl.com/2rl4w6]



    Requires: ocaml = 3.09.3-1

    Requires: ocaml = 3.09.3-1

    Requires: ocaml-pcre = 5.11.4-1, ocaml-extlib = 1.5-1, ocaml = 3.09.3-1

The final package requires the precise versions of the two libraries it was built against, plus the precise version of OCaml that it was built with.

I don't know how well this will interact with the Fedora build system. For instance if a new version of a fairly fundamental library (eg. ocaml itself, or something like ocaml-pcre) is released, everything which depends on that has to be recompiled. This is something of a perpetual problem for the Debian folks.

At one point I remember that OCaml in Ubuntu was really broken, apparently because they'd taken packages from upstream Debian half way through a transition like this, so some packages were compiled against one version of ocaml-pcre, and others against another version, with the result that you couldn't use certain combinations of libraries if the libraries depended on different ocaml-pcre.


Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]