[TriZPUG] gtk module finds wrong libraries

Joseph Mack NA3T jmack at wm7d.net
Thu Mar 31 16:35:40 CEST 2011


linux 2.6.x
python2.6 in /usr/local/lib

I'm installing on a system with old gnome libraries (eg gtk) 
which are in /usr/lib64 (/usr/lib64 is in /etc/ld.so.conf). 
Due to administrative constraints, I have to install in 
/usr/local, where I have installed the current gnome 
libraries, python and its modules. Thus I have new libraries 
in /usr/local/lib and the old libraries in /usr/lib64. 
/usr/local/lib is _not_ in /etc/ld.so.conf and I handle 
finding these libraries first by having /usr/local/lib first 
in LD_LIBRARY_PATH. This works so far, except the case here.

When I import gtk I get

Python 2.6.5 (r265:79063, Jan 26 2011, 11:29:31)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File 
"/usr/local/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 48, in <module>
     from gtk import _gtk
ImportError: 
/usr/local/lib/python2.6/site-packages/gtk-2.0/gtk/_gtk.so: undefined symbol: gtk_recent_action_get_type
>>>

The undefined symbol is in the new gnome libraries in 
/usr/local/lib, but not in the old libraries in /usr/lib64. 
It seems that python is looking to /etc/ld.so.conf (which 
directs it to /usr/lib64) to find its libraries, rather than 
using LD_LIBRARY_PATH.

If I move the old gnome libraries in /usr/lib64 out of the 
way, I can import gtk just fine. I'm not allowed to use this 
as a permanent solution and have to restore the old 
libraries.

How do I get python to look in /usr/local/lib before 
/usr/lib64 for its libraries?

I haven't found anything in Beazley, although I expect I 
don't know where to look.

Thanks Joe
-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!


More information about the TriZPUG mailing list