[Top][All Lists]

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

Problem with libtool under HPUX: BIND_FIRST flag is required

From: Jan Giesen
Subject: Problem with libtool under HPUX: BIND_FIRST flag is required
Date: Fri, 25 Nov 2005 23:16:26 +0100

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:
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:


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.

Best regards
                    Jan Giesen

----- Original Message ----- 
From: "Jan Giesen" <address@hidden>
Newsgroups: support.cvsnt-dev
Sent: Wednesday, November 23, 2005 11:01 PM
Subject: Re: Trace differences between HPUX and Linux

> My investigation has shown, that the wrong initialization of the
> "callbacks" struct is caused by a missing parameter for "shl_load"
> in the libltdl/ltdl.c file:
> Currently LT_BIND_FLAGS are defined as:
> This Define must be extended with the BIND_FIRST parameter:
> 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.
> Best regards
>                Jan Giesen
> "Tony Hoyle" <address@hidden> schrieb im Newsbeitrag
> news:address@hidden
> Jan Giesen wrote:
> > What could be the reason that the "callbacks" struct is not correctly
> > initialized??
> >
> No idea.  The GetCvsInfo in each library is only a single line that
> returns the address of the structure.  The only way I can imagine you'd
> get the wrong structure is if it was calling the wrong function, which
> should be impossible unless libtool on HPUX is severely broken.
> Tony

reply via email to

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