|
From: Jitka P. <jpl...@re...> - 2026-08-03 06:06:13
|
Hi, JFYI, I ran next round of test rebuild with latest SWIG (commit 65b1e662e). SWIG was build successfully. Rebuild of almost all dependencies passed. Only hugin is still failing with SWIG 4.5: https://copr.fedorainfracloud.org/coprs/jplesnik/swig-rebuild/build/10805524/ /builddir/build/BUILD/hugin-2025.0.1-build/hugin-2025.0.1/redhat-linux-build/src/hugin_script_interface/CMakeFiles/hsi.dir/hsiPYTHON_wrap.cxx: In function ‘PyObject* _wrap_Panorama_getCtrlPointsVectorForImage(PyObject*, PyObject*)’: /builddir/build/BUILD/hugin-2025.0.1-build/hugin-2025.0.1/redhat-linux-build/src/hugin_script_interface/CMakeFiles/hsi.dir/hsiPYTHON_wrap.cxx:58265:69: error: ‘HuginBase’ is not a member of ‘HuginBase’; did you mean ‘HuginBase’? 58265 | SwigValueWrapper< std::vector< std::pair< std::vector< HuginBase::HuginBase::ControlPoint,std::allocator< HuginBase::HuginBase::ControlPoint > >::size_type,HuginBase::ControlPoint >,std::allocator< std::pair< std::vector< HuginBase::HuginBase::ControlPoint,std::allocator< HuginBase::HuginBase::ControlPoint > >::size_type,HuginBase::ControlPoint > > > > result; | ^~~~~~~~~ For ldns, I prepared patch which you can found in PR https://src.fedoraproject.org/rpms/ldns/pull-request/9 It was applied also in upstream. It it should be solved different way, let me or ldns upstream know. Regards; Jitka On 8/2/26 22:29, William S Fulton wrote: > I didn't quite finish integrating the PEP 484 work, so hope to make > the release later in the week. > > William > > On Fri, 31 Jul 2026 at 01:49, William S Fulton > <ws...@fu...> wrote: > > Master de573cda78890318e570611066cf4e94f4066a6e fixed the > missing SWIG_FromCharPtrAndSize, see > https://github.com/swig/swig/pull/3522. > > There is nothing else essential to go into the release now. I > intend to cut the release on the weekend, probably Sunday. > However, I'm going to try and get some more of the Python PEP484 > type hints development into the release. It's new work so low risk. > > William > > On Wed, 29 Jul 2026 at 16:00, William S Fulton > <ws...@fu...> wrote: > > Erez, it is a problem as I outlined and if you write a > testcase you can reproduce it and then patch it as I > suggested. I think Jitka finds it easier to test master, but > in any case I need the fix as requested in master even if it > doesn't fix ldns. > > Cheers > William > > > On Wed, 29 Jul 2026, 09:32 Erez, <ere...@gm...> wrote: > > Hi Jitka, > > Thanks for your feedback. > > Could you please try this path? > > Yes, replace #define to %#define > > Thanks > Erez > > diff --git a/Lib/python/pystrings.swg > b/Lib/python/pystrings.swg > index 79a13a619..aec349b62 100644 > --- a/Lib/python/pystrings.swg > +++ b/Lib/python/pystrings.swg > @@ -73,7 +73,7 @@SWIG_AsCharPtrAndSize(PyObject *obj, char > **cptr, size_t *psize, int *alloc) > } > > %fragment("SWIG_FromCharPtrAndSize","header",fragment="SWIG_pchar_descriptor") { > -#define SWIG_FromCharPtrAndSize(carray, size) > SWIG_FromBinaryCharPtrAndSize(carray, size, 0) > +%#define SWIG_FromCharPtrAndSize(carray, size) > SWIG_FromBinaryCharPtrAndSize(carray, size, 0) > SWIGINTERNINLINE PyObject * > SWIG_FromBinaryCharPtrAndSize(const char* carray, size_t size, int flags) > { > > > On Wed, 29 Jul 2026 at 09:15, William S Fulton > <ws...@fu...> wrote: > > Thank you Jitka, that is wonderful. > > Sounds like we only need to look at the ldns failure. > I tracked it down to Erez's commit > https://github.com/swig/swig/commit/cd569d122a21bf43ffd64f3bb1c775c5ec9b0538. > Erez, I think we need to keep the > original SWIG_FromCharPtrAndSize function in the > wrappers as that is what it has always been called and > is a standard UTL function when > the SWIG_FromCharPtrAndSize fragment is referenced. > Some code does not go through the SWIG preprocessor > and so we need the following (shown just for python): > > *diff --git a/Lib/python/pystrings.swg > b/Lib/python/pystrings.swg* > *index 79a13a619..aec349b62 100644* > *--- a/Lib/python/pystrings.swg* > *+++ b/Lib/python/pystrings.swg* > @@ -73,7 +73,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) > } > > %fragment("SWIG_FromCharPtrAndSize","header",fragment="SWIG_pchar_descriptor") { > -#define SWIG_FromCharPtrAndSize(carray, size) > SWIG_FromBinaryCharPtrAndSize(carray, size, 0) > +%#define SWIG_FromCharPtrAndSize(carray, size) > SWIG_FromBinaryCharPtrAndSize(carray, size, 0) > SWIGINTERNINLINE PyObject * > SWIG_FromBinaryCharPtrAndSize(const char* carray, size_t size, int flags) > { > > > Could you patch up all the languages you modified in > the same way and expand the tests too to > check SWIG_FromCharPtrAndSize is still available when > it is not run through the SWIG preprocessor. > > Cheers > William > > On Tue, 28 Jul 2026 at 14:13, Jitka Plesnikova > <jpl...@re...> wrote: > > Hi, > > I finished test of SWIG 4.5.0 macro replacement > and there are some results: > > * 33 packages patched > * 31 built successfully in both swig-rebuild and > swig-test > > ** ldns required replacement: > SWIG_FromCharPtrAndSize, but there was no > recommendation so I used > PyUnicode_FromStringAndSize. The build passed. > Is it correct replacement? > > * 2 swig-rebuild failures are pre-existing and > unrelated to the patches: > - hugin - SWIG 4.5.0 C++ code generation bug > ('HuginBase' is not a member of 'HuginBase' in > auto-generated wrapper) > - lttng-tools - pre-existing test failure on > ppc64le > (test_ust_app_ctl_paths, 5/98 subtests failed) > Both succeeded in swig-test. > > I'll prepare pull requests for Fedora maintainers. > > Regards, > Jitka > > > On 7/27/26 16:58, Jitka Plesnikova wrote: >> Thank you for the analysis. Last week was a bit >> hectic after my vacation, >> so I didn't have much time to look into this. Now >> that my schedule is >> clearer, I will create and test the patches for >> Python Replacement. I'll be >> testing them against both SWIG 4.4 and SWIG 4.5. >> >> After that, I will reach out to the Fedora >> maintainers or upstream to make >> the necessary updates. >> >> I expect to have the first results by tomorrow. >> >> Note: I am using the SWIG source code from commit >> 510734337. The build of this >> source passed. >> https://koji.fedoraproject.org/koji/taskinfo?taskID=148374355 >> >> Regards, >> Jitka > > Jitka Plesnikova > Senior Software Engineer > Red Hat > > > > > _______________________________________________ > Swig-devel mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-devel -- Jitka Plesnikova Senior Software Engineer Red Hat |