Bug report #3378

Appears PyQt 4.8.2 now wraps QSet which causes a SIP error during compilation

Added by sharpie - about 13 years ago. Updated about 13 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:13438

Description

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 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.

make.log Magnifier - Log of make error during SIP invocation (1.38 KB) sharpie -, 2010-12-31 01:40 PM

Associated revisions

Revision 0bd65ee5
Added by Jürgen Fischer about 13 years ago

fix #3378

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14988 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 741d99c9
Added by Jürgen Fischer about 13 years ago

fix #3378

git-svn-id: http://svn.osgeo.org/qgis/trunk@14988 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Jürgen Fischer about 13 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

should be fixed in 741d99c9 (SVN r14989). Happy new year.

Also available in: Atom PDF