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

Re: ocaml compiled binaries and rpath



On Thu, Apr 17, 2003 at 02:09:25PM +0200, Denis Barbier wrote:
> On Wed, Apr 16, 2003 at 01:04:11PM +0200, Sven Luther wrote:
> [...]
> > > > Mmm, after a bit of testing, i see. That said, the libmlgdome.so is a
> > > > symlink to the dllmlgdome.so, and maybe it would make more sense to move
> > > > this symlink to /usr/lib/libmlgdome.so, would it not ?
> > > 
> > > It is a stublib, so I believe it should stay there
> > 
> > The stublib, no problem, but what about the lib... symlink ?
> 
> Is this symlink (dll -> lib) a hack or is it the Right Thing?

It is a hack, i think.

Basically, the ocaml runtime system will dynamically link files named
dllxxx.so. This was a name scheme chosen with upstream, and we cannot
really change it.

What Claudio does is that he need to link one of these dllxxx.so
libraries into other dllxxx.so libraries, but since gcc expect libraries
to be called libxxx.so, he uses this symlink hack. And since it is
exactly for that that he needs the rpath, it may well be a good idea
that he moves the symlink to /usr/lib.

A clean way would be to move the common stuff in a true library, which
has a versioned so name, and place this library into /usr/lib, as should
be, and then have wrapper libraries for it.

The problem is that we plan to have multiple installable versions of
ocaml. ocaml 3.06 installs in /usr/lib/ocaml/3.06/stublibs while ocaml
3.07 would install in /usr/lib/ocaml/3.07/stublibs. If we have the same
library package for both systems, the either the symlink in /usr/lib,
the common library in /usr/lib or the path in /etc/ld.so.conf would be
conflicting.

The real solution for this would be to create a separate package for the
common part, which is not nice, and probably overkill for a common
source code of 50 lines or so.

Friendly,

Sven Luther



Reply to: