Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python 2.5 Installation and Tkinter

Reply
Thread Tools

Python 2.5 Installation and Tkinter

 
 
milan_sanremo
Guest
Posts: n/a
 
      09-22-2006
Under Solaris 10 I installed tcl 8.5 and tk8.5 and they work just fine.
I built both with
../configure -prefix /usr/local/python/lib

I then set LD_RUN_PATH to /usr/local/python/lib and ran the ./configure
for Python 2.5 with no arguments. When I run make, it states:

INFO: Can't locate Tcl/Tk libs and/or headers
running build_scripts

I verified that the libraries are in /usr/local/python/lib. If I run
/usr/local/python/bin/wish8.5 it works.

My path incudes /usr/local/python/bin:/usr/local/python/lib.

How do I get Python to recognize Tcl/Tk for the build?

 
Reply With Quote
 
 
 
 
milan_sanremo
Guest
Posts: n/a
 
      09-22-2006

milan_sanremo wrote:
> Under Solaris 10 I installed tcl 8.5 and tk8.5 and they work just fine.
> I built both with
> ./configure -prefix /usr/local/python/lib
>
> I then set LD_RUN_PATH to /usr/local/python/lib and ran the ./configure
> for Python 2.5 with no arguments. When I run make, it states:
>
> INFO: Can't locate Tcl/Tk libs and/or headers
> running build_scripts
>
> I verified that the libraries are in /usr/local/python/lib. If I run
> /usr/local/python/bin/wish8.5 it works.
>
> My path incudes /usr/local/python/bin:/usr/local/python/lib.
>
> How do I get Python to recognize Tcl/Tk for the build?


I went back and rebuilt everything with the defaults. the tcl and tk
libs were written to /usr/local/lib.

Running python with the default settings does not find it. Changing
Modules/Setup TKLIB=/usr/local/lib still produces the error:

cc -shared
build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/_tkinter.o
build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/tkappinit.o
-L/usr/openwin/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lX11 -o
build/lib.solaris-2.10-i86pc-2.5/_tkinter.so

** WARNING: renaming "_tkinter" since importing it failed: ld.so.1:
python: fatal: libtk8.5.so: open failed: No such file or directory
running build_scripts

Yet, the file exists in /usr/local/lib. What am I missing?

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      09-23-2006
milan_sanremo schrieb:
> cc -shared
> build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/_tkinter.o
> build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/tkappinit.o
> -L/usr/openwin/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lX11 -o
> build/lib.solaris-2.10-i86pc-2.5/_tkinter.so
>
> Yet, the file exists in /usr/local/lib. What am I missing?


The system doesn't look in /usr/local/lib when searching for shared
libraries. You have the usual options:

1. Set LD_RUN_PATH at build time to include /usr/local/lib
2. Set LD_LIBRARY_PATH at run time to include /usr/local/lib
3. Use crle to add /usr/local/lib to the system wide search path

Even though it is quite intrusive, I typically prefer to do 3.
That way, I don't have to hard-code library paths into executables,
don't need my users to set environment variables, and have most
autoconf-based software work out of the box.

If you have never used crle before, understand that great care
is necessary in using it. See the EXAMPLES in crle(. You can
either use -u -l to add a directory at the end of the search
path, or just -l to overwrite the search path; make sure the
original search path is still included.

Regards,
Martin
 
Reply With Quote
 
milan_sanremo
Guest
Posts: n/a
 
      09-27-2006

> The system doesn't look in /usr/local/lib when searching for shared
> libraries. You have the usual options:
>
> 1. Set LD_RUN_PATH at build time to include /usr/local/lib
> 2. Set LD_LIBRARY_PATH at run time to include /usr/local/lib
> 3. Use crle to add /usr/local/lib to the system wide search path
>
> Even though it is quite intrusive, I typically prefer to do 3.
> That way, I don't have to hard-code library paths into executables,
> don't need my users to set environment variables, and have most
> autoconf-based software work out of the box.
>
> If you have never used crle before, understand that great care
> is necessary in using it. See the EXAMPLES in crle(. You can
> either use -u -l to add a directory at the end of the search
> path, or just -l to overwrite the search path; make sure the
> original search path is still included.
>
> Regards,
> Martin


Thanks for the detailed reply. I tried you suggestions regarding the
linking and they produce a new error message.

gcc -shared
build/temp.solaris-2.10-i86pc-2.5/export/home/rhancock/download/install/Python-2.5/Modules/_tkinter.o
build/temp.solaris-2.10-i86pc-2.5/export/home/rhancock/download/install/Python-2.5/Modules/tkappinit.o
-L/usr/openwin/lib -L/usr/local/lib -ltk8.4 -ltcl8.4 -lX11 -o
build/lib.solaris-2.10-i86pc-2.5/_tkinter.so
*** WARNING: renaming "_tkinter" since importing it failed: ld.so.1:
python: fatal: libtk8.4.so: open failed: No such file or directory
running build_scripts
creating build/scripts-2.5

Yet a ls of /usr/loca/lib shows the file exists:
drwxr-xr-x 4 root root 512 Sep 27 03:37 .
drwxr-xr-x 10 root root 512 Sep 27 03:28 ..
-rw-r--r-- 1 root root 626 Sep 27 02:31 charset.alias
-r-xr-xr-x 1 root root 786320 Sep 27 03:35 libtcl8.4.so
-rw-r--r-- 1 root root 2292 Sep 27 03:35 libtclstub8.4.a
-r-xr-xr-x 1 root root 977116 Sep 27 03:37 libtk8.4.so
-rw-r--r-- 1 root root 3548 Sep 27 03:37 libtkstub8.4.a
drwxr-xr-x 8 root root 512 Sep 27 03:35 tcl8.4
-rw-r--r-- 1 root root 7254 Sep 27 03:35 tclConfig.sh
drwxr-xr-x 5 root root 1024 Sep 27 03:37 tk8.4
-rw-r--r-- 1 root root 3566 Sep 27 03:37 tkConfig.sh

LD_RUN_PATH is set to /usr/local/lib.

I'm running this as root. I've built numerous programs ofver the last
five days, all without a problem. What am I missing on the Tkinter
inclusion?

 
Reply With Quote
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      09-27-2006
milan_sanremo schrieb:
> gcc -shared
> build/temp.solaris-2.10-i86pc-2.5/export/home/rhancock/download/install/Python-2.5/Modules/_tkinter.o
> build/temp.solaris-2.10-i86pc-2.5/export/home/rhancock/download/install/Python-2.5/Modules/tkappinit.o
> -L/usr/openwin/lib -L/usr/local/lib -ltk8.4 -ltcl8.4 -lX11 -o
> build/lib.solaris-2.10-i86pc-2.5/_tkinter.so
> *** WARNING: renaming "_tkinter" since importing it failed: ld.so.1:
> python: fatal: libtk8.4.so: open failed: No such file or directory
> running build_scripts
> creating build/scripts-2.5
>
> Yet a ls of /usr/loca/lib shows the file exists:
> drwxr-xr-x 4 root root 512 Sep 27 03:37 .
> drwxr-xr-x 10 root root 512 Sep 27 03:28 ..
> -rw-r--r-- 1 root root 626 Sep 27 02:31 charset.alias
> -r-xr-xr-x 1 root root 786320 Sep 27 03:35 libtcl8.4.so
> -rw-r--r-- 1 root root 2292 Sep 27 03:35 libtclstub8.4.a
> -r-xr-xr-x 1 root root 977116 Sep 27 03:37 libtk8.4.so
> -rw-r--r-- 1 root root 3548 Sep 27 03:37 libtkstub8.4.a
> drwxr-xr-x 8 root root 512 Sep 27 03:35 tcl8.4
> -rw-r--r-- 1 root root 7254 Sep 27 03:35 tclConfig.sh
> drwxr-xr-x 5 root root 1024 Sep 27 03:37 tk8.4
> -rw-r--r-- 1 root root 3566 Sep 27 03:37 tkConfig.sh
>
> LD_RUN_PATH is set to /usr/local/lib.
>
> I'm running this as root. I've built numerous programs ofver the last
> five days, all without a problem. What am I missing on the Tkinter
> inclusion?


Not sure whether it's a typo: If the file is in "/usr/loca/lib", you
should set LD_RUN_PATH to that, not "/usr/local/lib".

Are you sure LD_RUN_PATH is exported?

I would do "file /usr/local/lib/libtk8.4.so", to see whether it's
a "good" file.

Then I would invoke the linker line manually (so that _tkinter.so
doesn't get removed), and then do

ldd -s build/lib.solaris-2.10-i86pc-2.5/_tkinter.so

to see how it tries to resolve shared libraries.

HTH,
Martin
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: What is the differences between tkinter in windows and Tkinter inthe other platform? Hidekazu IWAKI Python 0 12-15-2009 05:58 AM
What is the differences between tkinter in windows and Tkinter in theother platform? Hidekazu IWAKI Python 1 12-14-2009 03:44 PM
yum installs Tkinter in a way visible to only one python installation Rahul Python 0 05-29-2008 04:40 PM
adding tkinter support on an existing python installation Rahul Python 0 05-29-2008 03:19 AM
Re: [Tkinter-discuss] Please help -- Tkinter Scale widget withDoubleVar is acting weird Jeff Epler Python 0 08-20-2004 12:07 PM



Advertisments