Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tix problem solved (Red Hat 7.x -> XLowerWindow undefined)

1 view
Skip to first unread message

Ben Caradoc-Davies

unread,
Feb 10, 2003, 7:54:33 PM2/10/03
to
I have a simple workaround for an annoying Tix problem on Red Hat 7.x systems.
The problem occurs with a binary tix RPM package (e.g. Red Hat tix-8.2.0b1-65)
and Python 2.2 compiled from source. The problem manifests as Tix.Tk() failing
with

TclError: couldn't load file "/usr/lib/libtix": /usr/lib/libtix.so:
undefined symbol: XLowerWindow

rendering Tix unuseable. This has been reported a few weeks ago on
comp.lang.python.

The problem is that the RPM libtix.so is not linked against libX11.so, and when
_tkinter.so loads the former dynamically, many symbols can't be resolved
(starting with XLowerWindow). By comparison, tixwish works normally as it is
linked against both libtix.so and libX11.so.

The solution is to explicitly link _tkinter.so against libtix.so, so that
references to libX11.so can be resolved when _tkinter.so itself is loaded
(_tkinter.so is already linked against libX11.so).

Somewhere in setup.py for Python 2.2 is the following:

# Add the Tcl/Tk libraries
libs.append('tk'+version)
libs.append('tcl'+version)

Insert a line to have _tkinter.so linked against libtix.so:

# Add the Tcl/Tk libraries
libs.append('tix')
libs.append('tk'+version)
libs.append('tcl'+version)

then

python setup.py build
python setup.py install

as usual. A more generic solution would add this entry only if Tix was
available, but this quick workaround works for me.

--
Ben Caradoc-Davies <b...@wintersun.org>
http://wintersun.org/
Imprisonment on arrival is the authentic Australian immigration experience.

Ben Caradoc-Davies

unread,
Feb 11, 2003, 6:13:08 AM2/11/03
to
On 11 Feb 2003 00:54:33 GMT, Ben Caradoc-Davies <b...@wintersun.org> wrote:
> python setup.py build
> python setup.py install

Yikes! A clean Python build and installation should of course be

./configure; make; make test; make install

Must try to get more sleeeeep ...

Erik Max Francis

unread,
Feb 11, 2003, 7:08:19 AM2/11/03
to
Ben Caradoc-Davies wrote:

> Yikes! A clean Python build and installation should of course be
>
> ./configure; make; make test; make install
>
> Must try to get more sleeeeep ...

I'd suggest

./configure && make && make test && make install

:-).

--
Erik Max Francis / m...@alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Never make a promise or plan / Take a little love where you can
\__/ Florence, _Chess_
Bosskey.net: Quake III Arena / http://www.bosskey.net/q3a/
A personal guide to Quake III Arena.

Michele Simionato

unread,
Feb 11, 2003, 12:00:45 PM2/11/03
to
Ben Caradoc-Davies <b...@wintersun.org> wrote in message news:<slrnb4ghn...@localhost.localdomain>...

> Insert a line to have _tkinter.so linked against libtix.so:
>
> # Add the Tcl/Tk libraries
> libs.append('tix')
> libs.append('tk'+version)
> libs.append('tcl'+version)
>
> as usual. A more generic solution would add this entry only if Tix was
> available, but this quick workaround works for me.

I have tried your suggestion for Python 2.3a1
(under Red Hat 7.2). Doesn't work. Same error. :-(


Michele

Ben Caradoc-Davies

unread,
Feb 11, 2003, 6:03:59 PM2/11/03
to
On 11 Feb 2003 09:00:45 -0800, Michele Simionato <mi...@pitt.edu> wrote:
> I have tried your suggestion for Python 2.3a1
> (under Red Hat 7.2). Doesn't work. Same error. :-(

1. Did you do a clean install (using make, not my stupid "python setup.py
install")? I noticed that without the make, _tkinter.so gets installed into
site-packages, not into lib-dynload, and the old _tkinter.so is found
first. You have to move it by hand into lib-dynload. Sorry for the
confusion.

2. Was _tkinter.so linked against libtix.so? Use (assuming
--prefix=/usr/local)

find /usr/local/lib/python2.3 -name _tkinter.so

to see how many _tkinter.so you have ;-) then

find /usr/local/lib/python2.3 -name _tkinter.so -exec ldd {} \;

to see if it is linked against libtix.so. You may have an old _tkinter.so
in lib-dynload.

The fix works with Red Hat 7.2 + Python 2.2c1, and Red Hat 7.0 + lots of
updates + Python 2.2.1.

Ben Caradoc-Davies

unread,
Feb 11, 2003, 6:08:31 PM2/11/03
to
On Tue, 11 Feb 2003 04:08:19 -0800, Erik Max Francis <m...@alcyone.com> wrote:
> Ben Caradoc-Davies wrote:
[snip]

>> ./configure; make; make test; make install
[snip]

>
> I'd suggest
>
> ./configure && make && make test && make install
>
>:-).

Depends how much faith you have in your reflexes. ;-)

Erik Max Francis

unread,
Feb 11, 2003, 9:38:13 PM2/11/03
to
Ben Caradoc-Davies wrote:

> Erik Max Francis <m...@alcyone.com> wrote:
>
> > I'd suggest
> >
> > ./configure && make && make test && make install
> >
> > :-).
>
> Depends how much faith you have in your reflexes. ;-)

I was thinking more along the lines of faith (or lack thereof) in each
step succeeding.

--
Erik Max Francis / m...@alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE

/ \ Do not seek death. Death will find you.
\__/ Dag Hammarskjold
Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
An Esperanto reference for English speakers.

Ben Caradoc-Davies

unread,
Feb 12, 2003, 8:14:55 AM2/12/03
to
On Tue, 11 Feb 2003 18:38:13 -0800, Erik Max Francis <m...@alcyone.com> wrote:
> Ben Caradoc-Davies wrote:
>> Erik Max Francis <m...@alcyone.com> wrote:
>> > ./configure && make && make test && make install
>> Depends how much faith you have in your reflexes. ;-)
> I was thinking more along the lines of faith (or lack thereof) in each
> step succeeding.

What's wrong with a shriek of panic and a half-dozen ^C^C^C^C^C^C to save your
production box if a step doesn't work? Surely there's a junior staff member you
can blame? ;->

0 new messages