Bug report #17039
qgis: FTBFS with sip 4.19.3: conflicting declaration ‘PyObject* sipExportedExceptions__core ’
|Affected QGIS version:||2.14.17||Regression?:||Yes|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24938|
As reported by Dmitry Shachnev in Debian Bug #872640:
qgis fails to build with sip 4.19.3 and python-qt4 4.12.1, both of which are available in experimental:/build/qgis-2.14.17+dfsg/debian/build/python/core/sip_corepart0.cpp:15288:40: error: conflicting declaration ‘PyObject* sipExportedExceptions__core ’ /build/qgis-2.14.17+dfsg/python/core/qgscoordinatetransform.sip:18:18: note: previous declaration as ‘PyObject* sipExportedExceptions__core ’ extern PyObject *sipExportedExceptions__core; // workaround: sipExportedExceptions__core is only defined in the first sip part ^~~~~~~~~~~~~~~~~~~~~~~~~~~
The reason is that since sip 4.19.3, the sipExportedExceptions arrays always have a NULL pointer as a trailing member, so size of this particular array is 2 with sip 4.19.2 and 3 with sip 4.19.3.
I am attaching a patch to remove this workaround line completely. It fixes build with sip 4.19.3 for me and does not affect build with sip 4.18.1. (I do not know why upstream needed this workaround.)
Unfortunately qscintilla2 built against this sip version is not available in experimental, so you will need a self-built qscintilla2 to reproduce this (remove debian/*.symbols as a workaround for bug #853628 to make the build succeed).