[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] New PyKDE Release (alpha6) and Killing PyKDE 3.8
From:       Simon Edwards <simon () simonzone ! com>
Date:       2004-04-27 16:48:13
Message-ID: 200404271848.13893.simon () simonzone ! com
[Download RAW message or body]

On Tuesday 27 April 2004 13:38, David Boddie wrote:
> On Tuesday 27 April 2004 08:22, Simon Edwards wrote:
> > Anyway, answer lies on the dlopen() man page:
> >
> >     Optionally, RTLD_GLOBAL may be or'ed with flag,  in  which  case
> >     the  external  symbols defined in the library will be made available 
to
> >     subsequently loaded libraries.
> I'm ahead of you here. ;-) The custom version of libpythonize I was using
> with PyKDE 3.8 did this to allow me to do things like embedding a console in
> Konqueror. I thought I sent you and Jim my changes...

nope, send it on. :) So you have a dlopen() two-stage stub thingy already?

> > Now, why does David's workaround actually work? When you link the kcontrol

> Thanks for the explanation. It's interesting to hear how it works;
> particularly the parts describing when things are actually loaded.

I read some docs and some info about ELF, played with objdump a bit and 
fiddled with it until I worked out what the difference was between a stub 
linked against time.so and one that is not.

> > For bonus points: Is it possible to make a kcontrol module stub that loads
> > libpythonize and libpython using dlopen(), but with the RTLD_GLOBAL flag
> > set so that dlopen() in the python interpreter will work as expected? I
> > guess I'll have to try that out... :-)
> 
> You just link in libpythonize at compile time, don't you?

linked as a normal shared library.

> > (BTW, linking with -export-dynamic -Wl,-E doesn't seem to have much 
effect)
> I'll tidy up what I have and send it to you. Maybe I'll get around to 
hacking
> on it again this weekend.

cool,

-- 
Simon Edwards             | Guarddog Firewall
simon@simonzone.com       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic