[PyKDE] PyKDE build fails on kio with KDE-3.1.1
Jim Bublitz
jbublitz at nwinternet.com
Sat Aug 9 00:46:10 BST 2003
On Friday August 8 2003 14:16, Mateusz Korniak wrote:
> On Friday 08 of August 2003 23:02, Jacob M. Burbach wrote:
> > When trying to build PyKDE-3.7-2 against KDE-3.1.1 compile
> > fails with the following error:
> > sip/kzip.sip: In function `PyObject*
> > sipConvertFrom_ulonglong(ulonglong*)': sip/kzip.sip:153:
> > `LONG_LONG' undeclared (first use this function) (...)
> > Using gentoo linux, Qt-3.1.2, KDE-3.1.1, SIP/PyQt versions
> > 3.7, Python-2.3.
> I bet it's Python 2.3 issue. It had LONG_LONG undefined. I've
> seen similar problem (and trival fix - defining LONG_LONG to
> it's 2.3 label) on mod_python list ...
That appears to be the problem.
In sip/kzip.sip,
Change this:
%If (KDE_3_1_0 - )
%MappedType longlong
//converts a Python long
{
%HeaderCode
typedef long long longlong;
%End
to:
%If (KDE_3_1_0 - )
%MappedType longlong
//converts a Python long
{
%HeaderCode
typedef long long longlong;
#define LONG_LONG PY_LONG_LONG
%End
and this:
%If (KDE_3_1_0 - )
%MappedType ulonglong
//converts a Python long
{
%HeaderCode
typedef unsigned long long ulonglong;
%End
to this:
%If (KDE_3_1_0 - )
%MappedType ulonglong
//converts a Python long
{
%HeaderCode
typedef unsigned long long ulonglong;
#define LONG_LONG PY_LONG_LONG
%End
I haven't installed Python 2.3 yet, so I can't test it, but the
PyLong_ function being called expects PY_LONG_LONG now instead
of the previous LONG_LONG. You can change the individual
instances too instead of using the #define.
For KDE versions less than 3.1.0, the same changes would need to
be made for Python 2.3, but in sip/global.sip instead.
There won't be a fix for this (or new tarball) for a while. It
should be easy to handle in sip, but my code generator doesn't
handle %FEATURE and associated conditionals correctly yet, so
it's kind of a major change for me.
Jim
More information about the PyQt
mailing list