[PyKDE] Re: PyKDE 3.7 Compile error (KDE/Qt 3.1.2 and Py 2.3)

Jim Bublitz jbublitz at nwinternet.com
Wed Sep 10 03:20:01 BST 2003


On Tuesday September 9 2003 12:24, Nickolaos Fotopoulos wrote:

> When I run make I get the following error:

> sip/kzip.sip: In function `PyObject*
> sipConvertFrom_ulonglong(ulonglong*)': sip/kzip.sip:153:
> `LONG_LONG' undeclared (first use this function)
> sip/kzip.sip:153: (Each undeclared identifier is reported only
> once for each function it appears in.)
> sip/kzip.sip:153: syntax error before `)' token
> sip/kzip.sip: In function `PyObject*
> sipConvertFrom_longlong(longlong*)': sip/kzip.sip:115: syntax
> error before `)' token
> make[1]: *** [kiohuge0.o] Error 1
> make[1]: Leaving directory `/build/PyKDE-3.7-4/kio'
> make: *** [sub-kio] Error 2

> After a bit of google'ing I found this:
> http://mats.gmd.de/pipermail/pykde/2003-August/005823.html
> and the proposed solution:
> http://mats.gmd.de/pipermail/pykde/2003-August/005829.html

> I tried this fix first by adding it to sip/kzip.sip, then by
> adding it to sip/global.sip, and finally by adding it to both
> files.  The error message generated when I attempt to run make
> is the same regardless of which of the above have been done to
> the source, and even with the clean source (unedited by me).

> This is a sample of what the edited source looks like:
> %If (KDE_3_1_0 - )
> %MappedType longlong
> //converts a Python long
> {
> %HeaderCode
> typedef long long longlong;
> #define LONG_LONG PY_LONG_LONG
> %End

> The #define line was added.  Could it possibly be something to
> do with the %If(KDE_3_1_0 - ) line?

> I am running KDE 3.1.2, Qt 3.1.2, and Python 2.3.

If you're building against KDE 3.1.2, you only need to worry 
about kzip.sip - that's what the %If (KDE_3_1_0 - ) in kzip.sip 
(and matching %If (- KDE_3_1_0  ) in global.sip) takes care of.

If you're using Python 2.3, you need to add 

    #define LONG_LONG PY_LONG_LONG

in the %HeaderCode blocks (as you've done above) for both
%MappedType longlong and %MappedType ulonglong (both places). 
It's a change in name from Python < 2.3 (LONG_LONG) to Python == 
2.3 (PY_LONG_LONG). 

The next release (PyKDE-3.8rc3 - will be on sourceforge by the 
end of the week) has a better fix for this and should take care 
of it automatically.


Jim




More information about the PyQt mailing list