[PyQt] PyQt 4.7.3 on Gumstix - Installation failed

David Boddie david at boddie.org.uk
Thu May 13 03:18:09 BST 2010


On Sun, 9 May 2010 23:22:45 -0700 (PDT), Mohamad Najib wrote:

> Sorry for the late reply.

No problem. Sorry for the late reply to your reply. :-)

> David Boddie wrote:
> > Is the Qt-4.6.2 installation a regular X11 installation, and is the
> > QtEmbedded-4.6.2-arm installation a QWS (non-X11, embedded Linux)
> > installation?
>
> Now, I don't know how to answer that one (let's just say I am quite new in
> these things). But the reason I got two installation of Qt in my directory
> is because I installed it twice. The first time, I forgot to pass the
> "-embedded arm" argument to the configure, and it results with me having
> the Qt-4.6.2 folder.

OK. That's not a problem in itself.

> > It sounds like there is a mismatch between PyQt and the installation of
> > Qt you are using. If I remember correctly, you should be using the qmake
> > executable in the QtEmbedded-4.6.2-arm installation.
>
> With only Qt-4.6.2 folder, I failed with an error during the early stages
> of configuring PyQt. It seems PyQt wants the QtEmbedded one, even when I
> direct it to the Qt-4.6.2 qmake. After installing the QtEmbedded, the early
> stages went through, only to fail at this part.

OK. It sounds strange that it would try to use the embedded version of Qt
when using qmake from the non-embedded version of Qt, but that's a different
problem.

> > Can you say how you configured each Qt library and how you configured
> > PyQt?
> > (Which options did you pass to the configure scripts?)
> > ...
>
> For Qt ("-embedded arm" is the additional configuration flag that I put to
> make the QtEmbedded-4.6.2-arm)
>
> -lrt -opensource -release (-embedded arm) -little-endian -no-svg
> -no-openssl -no-webkit -no-javascript-jit -no-xinerama -no-openvg -nomake
> examples -nomake demos -no-largefile -no-qt3support

I think this should be OK, but it might also be a good idea to pass the
-xplatform option as well, as mentioned here:

  http://doc.qt.nokia.com/4.6/qt-embedded-crosscompiling.html

> For PyQt (Both leads to the same error)
> -verbose -q /usr/local/Trolltech/Qt-4.6.2/bin/qmake
> -verbose -q /usr/local/Trolltech/QtEmbedded-4.6.2-arm/bin/qmake

It's a strange thing that they both give the same error if the Qt-4.6.2
installation is really a standard X11 desktop build.

Anyway, ignoring that problem, your original problem is that you're building
PyQt against an embedded version of Qt, and PyQt is designed to work with the
X11 version of Qt. This is why you got the error:

  sipQtGuicmodule.cpp:10698: error: 'XEvent' has not been declared

PyQt won't build against an embedded version of Qt, so you need to patch it.
I produced a set of patches for PyQt 4.6 (using Qt 4.5), but these may not
be new enough to work with what you are doing:

  http://bitbucket.org/dboddie/pyqt4-for-embedded-linux

It may be possible to just change a few things in the PyQt configuration
file and one or two .sip files so that PyQt can be configured against an
embedded version of Qt. However, you would have to be comfortable with the
idea of hacking the files in the PyQt package.

David


More information about the PyQt mailing list