[QGIS-Developer] Qt6: qgsspatialindex.sip: line 148: column 5: 'QgsSpatialIndex::intersects' has an unsupported return type
Richard Duivenvoorde
rdmailings at duif.net
Mon May 27 23:46:52 PDT 2024
FYI on Debian Sid, I use a commit of Nyall to which he pointed earlier:
https://github.com/nyalldawson/QGIS/commit/c9b8c74d8abbc61f373dafbe94c35f2b8e9fe41d
I do have some Python issues with the dbmanager then though, which I then remove from the build.
The rest is working and I was able to make a plugin work for Qt6.
Not sure if all this 'magic' (to me) is still needed.
Regards,
Richard
On 5/28/24 03:16, Germán Carrillo wrote:
> Hi Richard and Julien,
>
>
> Thanks a lot for sharing the steps to compile QGIS with Qt6 on Debian. I followed your steps on Ubuntu Noble (24.04) and I've been able to reach this point that you're mentioning in this thread, namely:
>
> 'QgsSpatialIndex::intersects' has an unsupported return type - provide %MethodCode and a C++ signature
> 'QgsSpatialIndex::nearestNeighbor' has an unsupported return type - provide %MethodCode and a C++ signature
> 'QgsSpatialIndex::nearestNeighbor' has an unsupported return type - provide %MethodCode and a C++ signature
> 'QgsAttributeTableView::selectedFeaturesIds' has an unsupported return type - provide %MethodCode and a C++ signature
> ninja: build stopped: subcommand failed.
>
> For me, it has worked by bringing back the MethodCode removed at [1] (which dealt with QList<qint64>). Namely, I copied these lines [2] to python/PyQt6/core/conversions.sip and built QGIS again.
>
> After doing that, and after installing a couple of missing libs (pytho3-pyqt6.qtpositioning and pytho3-pyqt6.qtserialport), QGIS runs with Python bindings enabled on Qt6.
>
>
> Julien, could this MethodCode be still needed for particular SIP versions? Could we bring back this MethodCode to python/PyQt6/core/conversions.sip or what could be the recommended approach?
>
>
> Regards,
>
> Germán
> ------------
> [1] https://github.com/qgis/QGIS/pull/55674/commits/5711a69d26e980395529b56e8e3fa757fbfb5550 <https://github.com/qgis/QGIS/pull/55674/commits/5711a69d26e980395529b56e8e3fa757fbfb5550>
> [2] https://github.com/qgis/QGIS/blob/895193f2dddb616cfd21c8cdde037b971f15aa32/python/core/conversions.sip#L1566-L1613 <https://github.com/qgis/QGIS/blob/895193f2dddb616cfd21c8cdde037b971f15aa32/python/core/conversions.sip#L1566-L1613>
>
> El mié, 31 ene 2024 a las 9:11, Richard Duivenvoorde via QGIS-Developer (<qgis-developer at lists.osgeo.org <mailto:qgis-developer at lists.osgeo.org>>) escribió:
>
> Hi,
>
> My Qt6 (test) build stops with the following:
>
> Generating the gui bindings...
> sip-build: /home/richard/git/qgisqt6/build/python/core/auto_generated/qgsspatialindex.sip: line 148: column 5: 'QgsSpatialIndex::intersects' has an unsupported return type - provide %MethodCode and a C++ signature
> /home/richard/git/qgisqt6/build/python/core/auto_generated/qgsspatialindex.sip: line 159: column 5: 'QgsSpatialIndex::nearestNeighbor' has an unsupported return type - provide %MethodCode and a C++ signature
> /home/richard/git/qgisqt6/build/python/core/auto_generated/qgsspatialindex.sip: line 179: column 5: 'QgsSpatialIndex::nearestNeighbor' has an unsupported return type - provide %MethodCode and a C++ signature
> /home/richard/git/qgisqt6/build/python/gui/auto_generated/attributetable/qgsattributetableview.sip: line 63: column 5: 'QgsAttributeTableView::selectedFeaturesIds' has an unsupported return type - provide %MethodCode and a C++ signature
> ninja: build stopped: subcommand failed.
>
> Is this my setup?
> Do others succeed in creating the python bindings?
>
> python3-sip/testing,now 4.19.25+dfsg-5+b2 amd64 [installed]
> python3-pyqt6.sip/testing,now 13.6.0-1+b1 amd64 [installed,automatic]
> python3-sipbuild/testing,now 6.8.1+dfsg-1 all [installed,automatic]
>
> Regards,
>
> Richard Duivenvoorde
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org <mailto:QGIS-Developer at lists.osgeo.org>
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
>
>
>
> --
> -----------
> |\__
> (:>__)(
> |/
> Soluciones Geoinformáticas Libres
> http://geotux.tuxfamily.org/ <http://geotux.tuxfamily.org/>
> https://twitter.com/GeoTux2 <http://twitter.com/GeoTux2>
More information about the QGIS-Developer
mailing list