[Top][All Lists]

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

Re: Problem with libtool under HPUX: BIND_FIRST flag is required

From: Ralf Wildenhues
Subject: Re: Problem with libtool under HPUX: BIND_FIRST flag is required
Date: Sat, 26 Nov 2005 11:17:22 +0100
User-agent: Mutt/1.5.9i

Hi Jan,

* Jan Giesen wrote on Fri, Nov 25, 2005 at 11:16:26PM CET:
> I have encountered a libtool problem, when I tried to build
> cvsnt (cf. under HPUX 11.11.
> This problem could be reproduced with libtool version 1.5.6
> as well as with 1.5.20:

Hrmpf, I need to fill out some stupid form in order to be able to
download this?

> Subroutines in shared libraries, which are loaded at runtime
> using libtldl are not correctly linked. The problem could be
> solved by adding the BIND_FIRST parameter to the LT_BIND_FLAGS
> Define in ltdl.c:

Browsing some documentation it may be we'd also need BIND_TOGETHER if we
add BIND_FIRST[1].  But..

> Background:
> ===========
> cvsnt loads at runtime a set of "trigger" libraries. These trigger
> libraries are shared libraries, which are implemented in C++ and
> are loaded using the libtool routines in ltdl.c.
> All trigger libraries export the same set of symbols, which are
> used to invoke specific functions (e.g. init(), etc.).
> If the trigger libraries are loaded in the sequence A, B, C,..
> then it happens that a call to the init() function of library B or C
> does not invoke this init() function, but the init() function of
> library A.
> This behaviour in in line with the HPUX docu, but different to the
> behaviour under Linux RedHat and it breaks cvsnt. By specifing
> BIND_FIRST the problem could be avoided.
> Therefore I propose that in ltdl.c the flag BIND_FIRST is by default
> part of LT_BIND_FLAGS.

This description is pretty good, but not good enough for me to totally
understand what you are (or cvsnt is) trying to do.  Like this?
  handle_A = lt_dlopen ("");
  handle_B = lt_dlopen ("");
  handle_C = lt_dlopen ("");
  void (*) pf (void);
  pf = lt_dlsym (handleA, "init");
  pf (...);

all from the main program?  Or maybe you open B from within A?
Or is init() the initializer function of the modules, and you don't ever
call it explicitly?

Note also that I can't test this, but there is hope that this situation
changes soon.   Meanwhile, it would be good if someone else could look
at this as well.

> > After extending this Define, the trigger libraries are loaded and
> > initialized.  This is in-line with the HPUX documentation.
> >
> > Unfortunately I have still a crash dump after unloading the last trigger
> > library...  Not everything is solved with this patch.

Hmm.  Does this have to do with libltdl, too, or is it cvsnt specific?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]