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(8). 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?