[PyQt] PyQt4 build problem : 'qHash' was not declared in this scope

Hans-Peter Jansen hpj at urpla.net
Thu Oct 1 20:08:43 BST 2009


Am Donnerstag 01 Oktober 2009 schrieb Phil Thompson:
> On Thu, 1 Oct 2009 06:42:23 -0700 (PDT), Thibault Bartolone
>
> <bartol_78 at yahoo.com> wrote:
> > Hello everyone. I'm trying to install a software that needs pyQt4 to
> > function (GNS3, Cisco router emulator).
> >
> > I'm running Linux CentOS 5.2 on a i386 type processor. I based the
> > compilation process on this page
> >
> > For that, I've successfully installed the following :
> > python python-devel xorg-x11-proto-devel libXext-devel
> >
> > and built the following :
> > qt-x11-opensource-src-4.5.0
> > sip-4.9.tar.gz
> >
> > I'm now trying to build PyQt-x11-gpl-4.6
> > The python configure part went ok. But the make part gives the
> > following message :
> >
> > make[1]: entrant dans le répertoire « /tmp/PyQt-x11-gpl-4.6/QtCore »
> > g++ -c -pipe -fPIC -O2 -Wall -W -D_REENTRANT -DNDEBUG -DQT_NO_DEBUG
> > -DQT_CORE_LIB -I. -I/tmp/PyQt-x11-gpl-4.6/qpy/QtCore
> > -I/usr/include/python2.4
> > -I/usr/local/Trolltech/Qt-4.4.1/mkspecs/default
> > -I/usr/local/Trolltech/Qt-4.4.1/include/QtCore
> > -I/usr/local/Trolltech/Qt-4.4.1/include -I/usr/X11R6/include -o
> > sipQtCoreQUrl.o sipQtCoreQUrl.cpp
> > sip/QtCore/qurl.sip: In function ‘long int
> > slot_QUrl___hash__(PyObject*)’:
> > sip/QtCore/qurl.sip:74: erreur: ‘qHash’ was not declared in this
>
> scope
>
> > make[1]: *** [sipQtCoreQUrl.o] Erreur 1
> > make[1]: quittant le répertoire « /tmp/PyQt-x11-gpl-4.6/QtCore »
> > make: *** [install] Erreur 2
> >
> > I don't know what this mistake is about. I tried to look on the
> > internet and on this mailing-list, but I found nothing.
> >
> > Any help appreciated !
> >
> > Thanks in advance !
>
> Try adding...
>
> %TypeCode
> #include <QHash>
> %End
>
> ...after the %TypeHeaderCode section in qurl.sip.

Phil, I get this failure reproducible (in openSUSE build service) for older 
qt versions: namely qt4-4.4.3 and qt4-4.4.0, aka. openSUSE 11.0 and 11.1 
(and all older versions I suspect). Do you want us to add a patch for all 
these builds? 

Pete



More information about the PyQt mailing list