I tried this and it worked exactly as James has conjectured.  The slowness
associated
with running pygnome programs when using pixmap themes has disappeared.

I suppose the question is, why did (presumably Guido) decide that loading
with the RTLD_GLOBAL flag was a bad idea?

Bill

James Henstridge wrote:

> I was just wondering about this problem.  I personally use python 1.5.1 (I
> haven't had time to upgrade yet), and many of the people who have been
> reporting problems seem to be using python 1.5.2.
>
> I checked the file at http://www.python.org/1.5/NEWS-152.txt, and it says
> the following for the summary of changes between 1.5.1 and 1.5.2a1:
>
>   - Revert a new feature in Unix dynamic loading: for one or two
>   revisions, modules were loaded using the RTLD_GLOBAL flag.  It turned
>   out to be a bad idea.
>
> If I am correct, this means that in 1.5.2, the symbols in the _gtk module
> (including those from libgtk.so and libgdk.so, which are dynamically
> linked to _gtkmodule.so) are not available to the main program.  So when
> gdk_imlib trys to load its png reader or whatever, the png reader can't
> see the imlib symbols, so fails with a dynamic linker error.  It would be
> a similar problem for theme stuff.
>
> If someone who was having trouble with the dynamic loading, and still have
> the source tree on there system, and don't mind recompiling python, would
> you mind trying something for me?  You would have to edit the source file
> that is responsible for dynamic module loading (it would be in the Python
> sub directory, and would be the only one containing a call to dlopen).  In
> that file, find all calls to dlopen, and add the flag RTLD_GLOBAL to the
> second parameter.  That is, if the call looks like this:
>   dlopen(string_variable, RTLD_NOW)
> to:
>   dlopen(string_variable, RTLD_NOW|RTLD_GLOBAL)
>
> Now do a recompile, and see if this fixes the problems with pixmap themes
> and pygtk.
>
> If this is not the cause of the problem, I don't know what is.
>
> James.
>
> --
> Email: [EMAIL PROTECTED]
> WWW:   http://www.daa.com.au/~james/
>



To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to