[QGIS-Developer] Build issue and SIP_CONCAT_PARTS

Julien Cabieces julien.cabieces at oslandia.com
Mon May 31 05:26:27 PDT 2021


Hi Matthias,

Thanks for the tip, I'll try that!

Kind regards,
Julien

> Hi Julien,
>
> I could fix these in the past by adding the appropriate ModuleHeaderCode,
> it requires looking into the generated sip_corepart file to find out which
> class was responsible.
>
> #ifdef SIP_RUN
> % ModuleHeaderCode
> #include "qgsoptionalexpression.h"
> % End
> #endif
>
> Hope this helps
> Matthias
>
> On Mon, May 31, 2021 at 9:11 AM Julien Cabieces <
> julien.cabieces at oslandia.com> wrote:
>
>>
>> Hy Nyall,
>>
>> Yes, I am already rebased on master. And I saw you change it to 13, so I
>> try to increase it to 14... and it works for core but not analysis.
>>
>> For now, I'm gonna stick with a concat value of 1, and when I'll be
>> ready to push, I'll search for a value which works.
>>
>> Thanks for your response.
>>
>> Kind regards,
>> Julien
>>
>> > 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
>>
>> _______________________________________________
>> 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