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 2.5.03.2151 (cf. www.cvsnt.org) 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: > > #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_FIRST | BIND_NONFATAL | > DYNAMIC_PATH) 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 ("A.la"); handle_B = lt_dlopen ("B.la"); handle_C = lt_dlopen ("C.la"); 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? Cheers, Ralf [1] http://docs.hp.com/en/B2355-90654/ch05s03.html _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool