[PyKDE] sip/PyQt 3.9

Hans-Peter Jansen hpj at urpla.net
Tue Dec 9 18:57:01 GMT 2003


Hi Phil,

(rpm) build $subject refuse to cooperate on Suse 9.0.

Building them with configure.py works fine (even a RPM_BUILD_ROOT 
is doing fine with simple DESTDIR= redirections).

Unfortunately it failed to execute such a sequence (reconstructed):

import libsip	# OK
import libqtc	# results in:
ImportError: libsip.so: cannot open shared object file: No such file
or directory

A bit of stracing showed, that libsip.so isn't lookup'ed correctly,
which could be related to /usr/lib/python/site-packages not existing
in /etc/ld.so.conf. Shouldn't this being resolved automatically?

As a q&d workaround, I mangled PyQts Makefiles with rpath:

for i in `find . -name Makefile -type f -print`; do
  sed -e "s|^LFLAGS = -shared$|LFLAGS = -shared -Wl,-rpath,%{python_site}|g" $i > $i.new
  if ! cmp -s $i $i.new; then
    mv $i.new $i
  else
    rm $i.new
  fi
done

before make and now, ldd resolves libsip correctly:

ldd /usr/lib/python/site-packages/libqtcmodule.so 
        libsip.so => /usr/lib/python2.3/site-packages/libsip.so (0x40799000)
        libqt-mt.so.3 => /usr/lib/libqt-mt.so.3 (0x407c6000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40eeb000)
[...]

While most simple PyQt scripts play fine now, eric-3.3 complains with:
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/eric3/eric3.py", line 135, in ?
    mw = UserInterface(loc)
  File "/usr/lib/python2.3/site-packages/UI/UserInterface.py", line 305, in __init__
  File "/usr/lib/python2.3/site-packages/UI/LogView.py", line 341, in addTab
  File "/usr/lib/python2.3/site-packages/UI/LogView.py", line 58, in __init__
SystemError: error return without exception set

Something isn't playing nice here, any ideas?

Pete




More information about the PyQt mailing list