[Kde-bindings] kdeutils PyKDE dep [No module named dl]

Percy Camilo Triveño Aucahuasi orgyforever at gmail.com
Sat Jul 19 18:19:15 UTC 2008


Hello there ; )

>if ARCH64:
>    import DLFCN as dl
>else:
>   import dl

Yep python should know the architecture, maybe that could be the solution.

I'm sending this post to kde-bindings mail list, I hope that someone can
explain this things better ; )

Best Regards
Percy



On Sat, Jul 19, 2008 at 8:11 AM, Teemu Rytilahti <tpr at d5k.net> wrote:

> Percy Camilo Triveño Aucahuasi kirjoitti viestissään (lähetysaika Friday 11
> July 2008):
> > Hi guys, when I was trying build "kdeutils", cmake couldn't find PyKDE4.
>
> Hi,
>
> > As far I know, this was a bug in python on x86_64 enviroments. I don't
> know
> > much about python, but maybe the SIP has generated this kind of code.
>
> Yup, I have also had the same problem using PyKDE4 bindings.
>
> > There is a way to solve this replace the code of
> > /usr/lib/python2.5/site-packages/PyKDE4/__init__.py
> > with this:
> >
> > #BEGIN
> > import sys
> > import ctypes
> > libc = ctypes.CDLL('libc.so.6')
> > libc.prctl(15, 'EntertainerBackend', 0, 0, 0)
> >
> > # This is needed to ensure that dynamic_cast and RTTI works inside
> kdelibs.
> > #sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
> > #END
>
> I have modified my __init__.py according to some forum/wiki post to look
> like
> this and its working:
> #import sys, dl
> import sys
> import DLFCN as dl
> # This is needed to ensure that dynamic_cast and RTTI works inside kdelibs.
> sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
>
> No idea though which way that should be handled. If Python allows detecting
> the processor architecture when the app is run, perhaps something like this
> could be as a workaround in __init__.py:
>
> if ARCH64:
>    import DLFCN as dl
> else:
>    import dl
>
>
> Anyone in charge of PyKDE4 bindings around?
>
> > After that kdeutils found the PyKDE4 module, but this is the right
> > solution? this is a bug that concer the KDE scope?
> >
> > Cheers
> > Percy
> >
> > pd: System info:
> > - gcc (Debian 4.3.1-2) 4.3.1
> > - qt build from trunk/qt-copy (last update today)
> > - all KDE modules from trunk (last update today)
> > - PyQt build from sources (version 4.4.2)
> > - kdebindings/python already built
>
>
> --
> Best Regards,
> Teemu Rytilahti
>
>
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080719/ec935f63/attachment.html>


More information about the Kde-bindings mailing list