Pmw.Blt and python 2.0/2.1

David Buscher dfb at mrao.cam.ac.uk
Tue Mar 13 07:09:36 EST 2001


Responding to my own query, I found that the problem is that when the
Python 2.1 autoconfigures which modules to build, it figures out that tk
is present and so builds tkinter, but doesn't figure out that BLT is also
there (despite the fact that libBLT.so is in the same directory as
libtk.so). It also turns out that the BeOpen Python 2.0 tkinter is built
without BLT enabled. Editing the Modules/Setup to enable tk and BLT works.

This highlights a problem with the new autoconfigure system in 2.1: how do
you find out what was actually built? Modules/Setup does not even show
that _tkinter.so should be built, and yet it is built. Where is the
autoconfigure system's idea of what is going to be built kept?

David

On Fri, 9 Mar 2001, David Buscher wrote:

> I've used Pmw.Blt with Python 1.5.2 with no problems, but I can't get it
> to work with Python 2.0 or 2.1. I can get Pmw to work fine, but not
> Pmw.Blt. Is there a known problem with this? Here is the session
> transcript:
>
> Python 2.1b1 (#1, Mar  8 2001, 20:37:37)
> [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)]
> on linux2
> Type "copyright", "credits" or "license" for more
> information.
> >>> from Tkinter import *
> >>> root=Tk()
> >>> import Pmw
> >>> Pmw.Blt.haveblt(root)
> 0
> >>> root.tk.call('package', 'require', 'BLT')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TclError: couldn't load file "/usr/lib/libBLT.so.2.4":
> /usr/lib/libBLT.so.2.4: undefined symbol:
> Tk_CanvasTagsParseProc
> >
>
> The same dialogue on python1.5 has no problems
>
> Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC
> egcs-2.91.66 19990314/Linux (egcs- on linux-i386
> Copyright 1991-1995 Stichting Mathematisch Centrum,
> Amsterdam
> >>> from Tkinter import *
> >>> root=Tk()
> >>> import Pmw
> >>> Pmw.Blt.haveblt(root)
> 1
> >>> root.tk.call('package', 'require', 'BLT')
> '2.4'
>
> I'm running Redhat 6.2, and the 1.5.2 python is 'out of the box', while
> the 2.1 is compiled from source - could this cause problems?
>
> My deduction from this output is that this is a problem with the way
> tkinter loads shared libraries - has this changed from 1.5 to 2.0/2.1? I'm
> using the same shared libraries for tk and blt in all cases.
>
> thanks
> David
>
> --------------------------------------+----------------------------------
>  Cavendish Laboratory                 |  Phone +44 1223 337302
>  Madingley Road                       |  Fax   +44 1223 354599
>  Cambridge CB3 0HE, UK                |  http://www.mrao.cam.ac.uk/~dfb
> --------------------------------------+----------------------------------
>
>




More information about the Python-list mailing list