[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: kdeutils PyKDE dep [No module named dl]
From: "=?ISO-8859-1?Q?Percy_Camilo_Trive=F1o_Aucahuasi?=" <orgyforever () gmail ! com>
Date: 2008-07-19 18:19:15
Message-ID: 579229230807191119g62022f01n466d7ef239df9dbc () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@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 <<
>
[Attachment #5 (text/html)]
<div dir="ltr">Hello there ; )<br><br>>if ARCH64:<br>>
import DLFCN as dl<br>
>else:<br>> import dl<br><br>Yep python should know the \
architecture, maybe that could be the solution.<br><br>I'm sending this post to \
kde-bindings mail list, I hope that someone can explain this things better ; ) <br> \
<br>Best Regards<br>Percy<br><br><br><br><div class="gmail_quote">On Sat, Jul 19, \
2008 at 8:11 AM, Teemu Rytilahti <<a href="mailto:tpr@d5k.net">tpr@d5k.net</a>> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Percy Camilo Triveño Aucahuasi \
kirjoitti viestissään (lähetysaika Friday 11<br> July 2008):<br>
<div class="Ih2E3d">> Hi guys, when I was trying build "kdeutils", cmake \
couldn't find PyKDE4.<br> <br>
</div>Hi,<br>
<div class="Ih2E3d"><br>
> As far I know, this was a bug in python on x86_64 enviroments. I don't \
know<br> > much about python, but maybe the SIP has generated this kind of \
code.<br> <br>
</div>Yup, I have also had the same problem using PyKDE4 bindings.<br>
<div class="Ih2E3d"><br>
> There is a way to solve this replace the code of<br>
> /usr/lib/python2.5/site-packages/PyKDE4/__init__.py<br>
> with this:<br>
><br>
> #BEGIN<br>
> import sys<br>
> import ctypes<br>
> libc = ctypes.CDLL('libc.so.6')<br>
> libc.prctl(15, 'EntertainerBackend', 0, 0, 0)<br>
><br>
> # This is needed to ensure that dynamic_cast and RTTI works inside kdelibs.<br>
> #sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)<br>
> #END<br>
<br>
</div>I have modified my __init__.py according to some forum/wiki post to look \
like<br> this and its working:<br>
#import sys, dl<br>
import sys<br>
import DLFCN as dl<br>
<div class="Ih2E3d"># This is needed to ensure that dynamic_cast and RTTI works \
inside kdelibs.<br> sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)<br>
<br>
</div>No idea though which way that should be handled. If Python allows detecting<br>
the processor architecture when the app is run, perhaps something like this<br>
could be as a workaround in __init__.py:<br>
<br>
if ARCH64:<br>
import DLFCN as dl<br>
else:<br>
import dl<br>
<br>
<br>
Anyone in charge of PyKDE4 bindings around?<br>
<div><div></div><div class="Wj3C7c"><br>
> After that kdeutils found the PyKDE4 module, but this is the right<br>
> solution? this is a bug that concer the KDE scope?<br>
><br>
> Cheers<br>
> Percy<br>
><br>
> pd: System info:<br>
> - gcc (Debian 4.3.1-2) 4.3.1<br>
> - qt build from trunk/qt-copy (last update today)<br>
> - all KDE modules from trunk (last update today)<br>
> - PyQt build from sources (version 4.4.2)<br>
> - kdebindings/python already built<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Best Regards,<br>
Teemu Rytilahti<br>
<br>
<br>
<br>
>> Visit <a href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to \
unsubscribe <<<br> </font></blockquote></div><br></div>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic