Bug 162833 - can't compile pykde, SIP error.
Summary: can't compile pykde, SIP error.
Status: RESOLVED WORKSFORME
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-29 21:42 UTC by Rosetzky Cedric
Modified: 2008-06-29 19:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rosetzky Cedric 2008-05-29 21:42:59 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          GCC-4.2.3 
OS:                Linux

I can't compile kde-bindings because of this error :

sip: KMacroExpander::expandMacros() unsupported function argument type - provide %Method code and a valid C++ signature
Comment 1 Rosetzky Cedric 2008-06-18 17:30:19 UTC
Resolved when updating python-sip. There an unspecified minimum requirement for this library.
Comment 2 John Babiak 2008-06-29 17:58:04 UTC
I get the same error message when trying to compile kdebindings-4.0.5 from source. I'm using VectorLinux 5.9 SOHO (based on Slackware-12.0), qt-4.3.2, python-2.5.1, gcc-4.1.2, sip-4.7.6. Here is output from my latest attempt to build PyKDE4.kdecore:

[ 54%] Generating sip/kdecore/sipkdecorepart0.cpp, sip/kdecore/sipkdecorepart1.cpp, sip/kdecore/sipkdecorepart2.cpp, sip/kdecore/sipkdecorepart3.cpp, sip/kdecore/sipkdecorepart4.cpp, sip/kdecore/sipkdecorepart5.cpp, sip/kdecore/sipkdecorepart6.cpp, sip/kdecore/sipkdecorepart7.cpp
-- Generating CPP code for module PyKDE4.kdecore
sip: KMacroExpander::expandMacros() unsupported function argument type - provide %Method code and a valid C++ signature
make[2]: *** [python/pykde4/sip/kdecore/sipkdecorepart0.cpp] Error 1
make[1]: *** [python/pykde4/CMakeFiles/python_module_PyKDE4_kdecore.dir/all] Error 2
make: *** [all] Error 2
Comment 3 John Babiak 2008-06-29 19:23:21 UTC
I just upgraded sip to the version 4.7.7 snapshot generated on 15 June 2008 (all other items in my tool chain listed in comment #2 are unchanged). I still get an error message when trying to compile PyKDE4.kdecore from kdebindings-4.0.5. However, the error is different. Terminal output from the build of PyKDE4.kdecore follows:

[ 54%] Generating sip/kdecore/sipkdecorepart0.cpp, sip/kdecore/sipkdecorepart1.cpp, sip/kdecore/sipkdecorepart2.cpp, sip/kdecore/sipkdecorepart3.cpp, sip/kdecore/sipkdecorepart4.cpp, sip/kdecore/sipkdecorepart5.cpp, sip/kdecore/sipkdecorepart6.cpp, sip/kdecore/sipkdecorepart7.cpp
-- Generating CPP code for module PyKDE4.kdecore
sip: /usr/share/sip/PyQt4/QtGui/qpolygon.sip:289: Incorrect number of arguments to Python slot
make[2]: *** [python/pykde4/sip/kdecore/sipkdecorepart0.cpp] Error 1
make[1]: *** [python/pykde4/CMakeFiles/python_module_PyKDE4_kdecore.dir/all] Error 2
make: *** [all] Error 2

Here is the source code from /usr/share/sip/PyQt4/QtGui/qpolygon.sip around line 289 from the 20080615 snapshot of sip-4.7.7 (line 289 will have arrows pointing to it):

void __delitem__(SIP_PYSLICE slice, const QPolygon &list);
%MethodCode
#if PY_VERSION_HEX >= 0x02050000
Py_ssize_t len, start, stop, step, slicelength, i;
#else
int len, start, stop, step, slicelength, i;
#endif

len = sipCpp->count();

if (PySlice_GetIndicesEx((PySliceObject *)a0, len, &start, &stop, &step, &slicelen$
    sipIsErr = 1;
else
    for (i = 0; i < slicelength; ++i)
    {
        sipCpp->remove(start);
        start += step - 1;
    }
%End

--->QPolygon &operator[](SIP_PYSLICE slice);<---
%MethodCode
#if PY_VERSION_HEX >= 0x02050000
Py_ssize_t len, start, stop, step, slicelength, i;
#else
int len, start, stop, step, slicelength, i;
#endif

Hopefully this snippet of code from the piece of sip that caused the error message can help in tracking down why it occurred.