[QGIS-trac] [Quantum GIS] #3378: Appears PyQt 4.8.2 now wraps QSet which causes a SIP error during compilation

Quantum GIS qgis at qgis.org
Fri Dec 31 16:37:34 EST 2010


#3378: Appears PyQt 4.8.2 now wraps QSet which causes a SIP error during
compilation
---------------------------------------------------------+------------------
   Reporter:  sharpie                                    |              Owner:  nobody       
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.7.0
  Component:  Build/Install                              |            Version:  1.6.0        
   Keywords:                                             |   Platform_version:               
   Platform:  All                                        |           Must_fix:  Yes          
Status_info:  0                                          |  
---------------------------------------------------------+------------------
 I'm not that familiar with the inner workings of SIP or PyQT, so apologies
 up front for any inaccuracies in the following report.

 After upgrading to Qt 4.7.1/PyQt 4.8.2/SIP 4.12, I get the following error
 during compilation:

 {{{
 sip: /tmp/homebrew-
 qgis-1.6.0-ecgD/qgis-1.6.0/python/core/conversions.sip:326: %MappedType
 template for this type has already been defined
 }}}

 Examining the offending file, python/core/conversions.sip, reveals that
 SIP has a complaint with the definition of QSet<TYPE> on line 326.  The
 header also explains that:

 {{{
 /*
 This file contains code for conversion between various (often nested)
 mapped types
 which are not wrapped by PyQt:
 - QVector< QVector<TYPE> >
 - QVector< QVector< QVector<TYPE> > >
 - QList< QList<TYPE> >
 - QSet<int>
 - QSet<TYPE>
 - QMap<int, QMap<int, TYPE> >
 - QMap<QString, QVariant::Type>
 - QMap<TYPE1, TYPE2*>
 - QMap<double, TYPE>
 - QMultiMap<double, TYPE2>
 - QMap<int, QgsOverlayObject*>*
 */
 }}}

 A quick grep of the PyQt 4.8.2 installation revealed that QSet<type> is
 defined in:

 PYQT_ROOT/share/sip/QtCore/qset.sip

 The [http://www.riverbankcomputing.com/static/Downloads/PyQt4/ChangeLog
 4.8.2 Changelog] hints that this may have been added in the current
 release.

 Unfortunately, Riverbank has an ugly habit of not maintaining an archive
 of past releases or providing repository access for PyQt, so I cannot
 verify that QSet was indeed added in 4.8.2.

 Removing the QSet definition from conversions.sip allows QGIS to compile
 and it appears to work.  However, this is definitely not the right thing
 to do and I don't have the PyQt experience to suggest what the right thing
 may be.

 Make log attached.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/3378>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list