[QGIS-Developer] Build issue and SIP_CONCAT_PARTS

Nyall Dawson nyall.dawson at gmail.com
Thu May 27 15:22:58 PDT 2021


On Wed, 26 May 2021 at 23:49, Julien Cabieces
<julien.cabieces at oslandia.com> wrote:
>
>
> Hi devs,
>
> I'm working on a new QGIS feature and wanted to add a new API in core module. I get a strange error when building, on a class not related to what I am adding.
>
> /home/julien/work/QGIS/build_debug/python/core/sip_corepart11.cpp:272:67: error: no type named 'QgsOptionalQgsExpressionBase' in the global namespace; did you mean 'QgsOptionalExpression'?
>      ::QgsOptionalQgsExpressionBase *sipCpp = reinterpret_cast< ::QgsOptionalQgsExpressionBase *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QgsOptionalQgsExpressionBase));
>
> It said that QgsOptionalExpressionBase is not defined in
> sip_corepart_11.cpp, but the typedef is actually in sip_corepart_10.cpp,
> at the end of the file.

Are you based on a recent master branch? I had to bump the concat
parts to 13 recently to avoid this exact issue. Perhaps if you rebase
it will be fixed already.

> From what I understand, CMakeList variable SIP_CONCAT_PARTS allows to
> split the SIP generated cpp code in several module, but in this case it
> looks like split happens on a bad location (typedef on one side, part of
> the code on the other side).

Yeah, it's sip being fragile. We've hit this many times in past, and
the solution each time is to increase the number of parts by 1.

>
> If I set SIP_CONCAT_PARTS to 1, it works.
>
> Has anyone already facing this kind of issue? Is there some sort of instruction that I should be aware of to solve this?
>
> I'm on master, Debian Bullseye, SIP 4.19.25
>
> Kind regards,
> Julien
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list