[review] [PyKDE] build error w/ KDE 3.5.2 on Mac OS X (Qt3/X11)

Jim Bublitz jbublitz at nwinternet.com
Wed Mar 22 20:55:25 GMT 2006


On Wednesday 22 March 2006 09:59, Benjamin Reed wrote:
> I'm trying to package kdebindings 3.5.2 for fink (against qt/x11), and
> running into a compile error in pykde:
>
> ---(snip!)---
> g++-4.0 -c -Wno-deprecated-declarations -pipe -fPIC -Os -Wall -W
> -D__DARWIN_X11__ -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
> -I/Users/ranger/tmp/kdebindings/kdebindings-3.5.2-new/python/pykde/../pykde
>/kparts
> -I/Users/ranger/tmp/kdebindings/kdebindings-3.5.2-new/python/pykde/extra/kd
>ecvs -I/sw/include -I/sw/include/kio -I../kio -I/sw/include/kparts
> -I/sw/lib/qt3/include
> -I/Users/ranger/tmp/kdebindings/kdebindings-3.5.2-new/python/sip/siplib
> -I/sw/include/python2.4 -I/usr/X11R6/include -o sipkpartspart0.o
> /Users/ranger/tmp/kdebindings/kdebindings-3.5.2-new/python/pykde/../pykde/k
>parts/sipkpartspart0.cpp sipkpartsKPartsEvent.h:43: error: expected
> class-name before '{' token sipkpartsKPartsEvent.h:46: error: expected
> unqualified-id before '&' token sipkpartsKPartsEvent.h:46: error: expected
> ',' or '...' before '&' token sipkpartsKPartsEvent.h:46: error: ISO C++
> forbids declaration of
> 'parameter' with no type
> sipkpartsKPartsGUIActivateEvent.h:42: error: invalid use of undefined
> type 'struct KParts::GUIActivateEvent'
> /sw/include/kparts/part.h:49: error: forward declaration of 'struct

> ---(snip!)---

> Since this is all a maze of generated code, I'm not really sure where
> to look to find out what's going on.  Any ideas?

I get this kind of thing about once a year (hundreds of errors) and either I 
forget what causes it or I never really track down the cause.

In this case, I'd suspect that gcc 4.0 is the problem - early versions (before 
4.0.3 ??) can't handle the large files PyKDE generates, although I would have 
expected problems before you got this far.  Since you're compiling 
sipkpartspart0.cpp, that means all of the kparts .cpp files have been 
concatenated (by sip) into one huge file. Normally, configure.py would detect 
the problem versions of gcc and generate single files for each class, rather 
than a single large file. 

The command line options to configure.py control code generation: -c 
concatenates, -i doesn't. Since this is from kdebindings, I don't know if 
configure.py has been updated to handle this automatically (I don't maintain 
the kdebindings code, just the tarballs).

What you can try is:

    python configure.py -lkparts -i

That will re-generate only kparts, and generate individual .cpp files. Then 
run make (the earlier modules shouldn't recompile if you use -l).

If that doesn't work, let me know what happens and we'll go from there (or 
maybe Simon Edwards has some ideas). I don't have a Mac to try this on.

Jim




More information about the PyQt mailing list