[kde-freebsd] [Call for Help] kpythonpluginfactory (Printer Configuration)

Kris Moore kris at pcbsd.org
Fri Oct 30 17:25:17 CET 2009


On Fri, 30 Oct 2009, David Naylor wrote:

> Hi,
>
> It appears that kpythonpluginfactory does not work when the python script
> calls a lib-dynload object (such as 'import time').  A typical message is:
>
> ImportError: /usr/local/lib/python2.6/lib-dynload/time.so: Undefined symbol
> "PyExc_IOError"
>
> This stops system-settings-printer-kde from working (and, I think plasma-
> python scripting).  I know this worked in KDE 4.2.0.  A tentative speculation
> to the cause leads me to conclude something happened to FreeBSD (I still needs
> to do an upgrade to RC2)*.
>
> I did, however, find a work around: get kpythonpluginfactory to link
> statically to python.  This obviously leads to a bigger file.
>
> Does anyone have KDE <4.2.2 running, if so please install print/system-config-
> printer-kde and see if you can load the "Printer Configuration" in
> systemsettings.  Please report if the config module loads and what version of
> KDE and FreeBSD you are running.
>
> Thanks,
>
> David
>
> *I'm also having problems with cups-smb and this may be related
>

David,

I did some investigation with this issue a while back. I think its a bug in the python port itself,
none of the lib-dynload libraries are linked to the main python library. For example, if you run
this:

setenv LD_PRELOAD "/usr/local/lib/libpython2.6.so" ; systemsettings

You should now be able to bring up the KDE printer interface. If you do this, you can see what
those libs are linked to:

# cd /usr/local/lib/python2.6/lib-dynload
# setenv LD_LIBRARY_PATH `pwd`
# ldd time.so
time.so:
 	libm.so.5 => /lib/libm.so.5
 	libthr.so.3 -> /lib/libthr.so.3
 	libc.so.7 => /lib/libc.so.7

I'm thinking that if we fix the python port to link these lib-dynload/* libaries to 
/usr/local/lib/libpython2.6.so the problem will go away. Investigating this now actually, but if somebody
else had ideas on this, please let us know :)

--
Kris Moore
PC-BSD Software



More information about the kde-freebsd mailing list