[Starkit] loading relocatable libraries using tclkit

arnaldo yokomizo ayokomizo at cfl.rr.com
Mon May 23 13:12:31 CEST 2005


I have been trying to load a large relocatable library in C++, made up of
both our own code and third-party libraries.

 

When I use the "load <xxx>..so" command in tclsh, it does work fine, but
when I do the same in 'tclkit', it core-dumps. I am running my application
on a Sun SparcStation and Solaris.

 

By debugging using 'dbx', I found out that it core dumps while trying to
resolve static variable initialization in the libraries while calling system
routine 'dlopen()'. 'dlopen' just loads the relocatable library. 

 

For the libraries for which I have the source code, I either changed the
order of the libraries when I create my relocatable library, or changed the
source code so that it does not cause cross-initialization issues. But I
cannot resolve that for my third-party libraries, and I don't even know if
there is an optimal order for resolving unreferenced symbols AND
initializing static variables.

 

It seems to me that 'dlopen()' is called in 'tclsh' in relaxed mode, but it
is called in 'starkit' in strict, close mode. That would explain why I can
load the library in 'tclsh', but not in 'tclkit'. Is that right?

 

Is there any solution to my problem? Is there any other way I can have my
libraries loaded in 'tclkit' ?

 

Thanks for your advice.

 

Arnaldo

---------------------------------------------------------------------------

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.equi4.com/pipermail/starkit/attachments/20050523/1a63f04e/attachment.htm


More information about the Starkit mailing list