Python 2.5 Installation and Tkinter

"Martin v. Löwis" martin at v.loewis.de
Wed Sep 27 12:52:28 EDT 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



More information about the Python-list mailing list