can't get tkinter to work with 2.1 / Solaris
Robert Roy
rjroy at takingcontrol.com
Mon Jun 4 20:59:52 EDT 2001
On Mon, 04 Jun 2001 18:41:38 -0000, klassa at cisco.com (John Klassa)
wrote:
>
>Try as I might, I can't make tkinter happy. I'm doing:
>
> make distclean
> ./configure --prefix=/users/klassa/local --enable-gcc \
> --libdir=/users/klassa/local/lib \
> --includedir=/users/klassa/local/include
> make
> make install
> make install libinstall
>
>I just downloaded Tcl 8.3 and installed it into the /users/klassa/local
>tree. It's there. :-) To wit:
>
I had to build on Solaris with files in non-standard locations as
well. As you have seen Tkinter is normally built by setup.py. You can
however override this by uncommenting the appropriate entries in
Modules/Setup (just like building older python versions).
I found it easer to link Tkinter stuff statically so I built tcl and
tk with --disable-shared (?).
This is also a useful trick when you are not sure which versions of
other libraries are on the host system or you have some that give you
"relocatable code" errors on build. For instance I wanted to use
readline 4.2, and the latest version of gdbm so I built the static
libraries and included them via Setup.
Bob.
> % cd /users/klassa/local/lib
> % ls -alF libt*
>-r-xr-xr-x 1 klassa eng 707476 Aug 31 1999 libtcl8.2.so*
>-r-xr-xr-x 1 klassa eng 709428 Jun 4 12:35 libtcl8.3.so*
>-rw-r--r-- 1 klassa eng 2012 Aug 31 1999 libtclstub8.2.a
>-rw-r--r-- 1 klassa eng 2012 Jun 4 12:35 libtclstub8.3.a
>-r-xr-xr-x 1 klassa eng 906684 Aug 31 1999 libtk8.2.so*
>-r-xr-xr-x 1 klassa eng 991204 Jun 4 12:38 libtk8.3.so*
>-rw-r--r-- 1 klassa eng 1862 Aug 31 1999 libtkstub8.2.a
>-rw-r--r-- 1 klassa eng 3706 Jun 4 12:38 libtkstub8.3.a
>-rw-r--r-- 1 klassa eng 478674 Mar 29 2000 libtransfig.a
>
>The .h files are in /users/klassa/local/include, as expected.
>
>My LD_LIBRARY_PATH includes /users/klassa/local/lib, but does *not*
>include /usr/local/lib. When I build python, it seems happy. When I
>install it and run it, then try to "import _tkinter" (per
>http://www.python.org/topics/tkinter/trouble.html#checking), I get:
>
> % python
>Python 2.1 (#1, Jun 4 2001, 13:45:22)
>[GCC 2.9-cisco-98r1] on sunos5
>Type "copyright", "credits" or "license" for more information.
>>>> import _tkinter
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
>ImportError: ld.so.1: python: fatal: libtcl8.0.so: open failed:
>No such file or directory
>>>>
>
>Note that /users/klassa/local/lib does *not* include libtcl8.0.so, which
>is undoubtedly the source of the problem. Yet, I can't figure out how to
>make python look for libtcl8.3.so. If I change my LD_LIBRARY_PATH to
>include a directory that has libtcl8.0.so, it works. I don't want 8.0,
>however. :-)
>
>I don't see anywhere that I'm explicitly telling the build process to look
>in /usr/local/lib (which is where it's getting the 8.0 version), yet it
>appears to want to go there anyway. I went so far as to edit setup.py, to
>remove the references to /usr/local (which it inserts, regardless -- as
>borne out by the comments). Didn't help.
>
>I'm grasping at straws now... Pointers to useful docs appreciated. I
>think I've read all the relevant once (I read through the tkinter
>installation and trouble-shooting pages, and grepped the source tree for
>other useful tidbits).
>
>Ideas?
>
>Thanks,
>John
>
>--
>John Klassa / Cisco Systems, Inc. / RTP, NC / USA / klassa at cisco.com / <><
> [ Save bits! Don't quote entire threads in your reply. ]
More information about the Python-list
mailing list