Fwd: sip6: AttributeError: 'YaccProduction' object has no attribute 'parser_manager'

Ben Greiner code-pyqt at bnavigator.de
Mon Apr 25 11:49:53 BST 2022


Hi Phil,

unfortunately the fix in 
https://www.riverbankcomputing.com/hg/sip/rev/d43fc89f7ef2 is not 
sufficient. The QGIS build will throw the next Python exception. I went 
through this on the weekend and ended up with the attached patch, but it 
does not produce a valid parser, so I gave up. (I suspect my changes in 
the instantiation code are wrong):

The patched SIP and the QGIS build attempt can also be found on 
https://build.opensuse.org/package/show/home:bnavigator:branches:Application:Geo

- Ben

Am 25.04.22 um 12:29 schrieb Phil Thompson:
> Should be fixed in the next snapshot.
>
> Thanks,
> Phil
>
> On 21/04/2022 11:40, Dmitry Shachnev wrote:
>> Hi Phil!
>>
>> Forwarding a bug report that I got from maintainer of qgis [1] in 
>> Debian.
>> It fails to build after upgrading sip from v6.5.1 to v6.6.1.
>>
>> Our ply version is 3.11 (the latest one).
>>
>> [1]: https://qgis.org
>>
>> ----- Forwarded message from Bas Couwenberg <sebastic at xs4all.nl> -----
>>
>> Date: Thu, 21 Apr 2022 05:39:50 +0200
>> From: Bas Couwenberg <sebastic at xs4all.nl>
>> To: Debian Bug Tracking System <submit at bugs.debian.org>
>> Subject: Bug#1009939: sip6: AttributeError: 'YaccProduction' object
>> has no attribute 'parser_manager'
>> X-Mailer: reportbug 11.4.1
>>
>> Source: sip6
>> Version: 6.6.1+dfsg-1
>> Severity: serious
>> Control: affects -1 src:qgis
>>
>> Dear Maintainer,
>>
>> Since the upgrade to 6.6.1+dfsg-1 qgis FTBFS:
>>
>>  FAILED: python/analysis/build/_analysis/sip_analysispart0.cpp
>> python/analysis/build/_analysis/sip_analysispart1.cpp
>> python/analysis/build/_analysis/sip_analysispart2.cpp
>> python/analysis/build/_analysis/sip_analysispart3.cpp
>> python/analysis/build/_analysis/sip_analysispart4.cpp
>> python/analysis/build/_analysis/sip_analysispart5.cpp
>> python/analysis/build/_analysis/sip_analysispart6.cpp
>> python/analysis/build/_analysis/sip_analysispart7.cpp
>> python/analysis/build/_analysis/sip_analysispart8.cpp
>> python/analysis/build/_analysis/sip_analysispart9.cpp
>> python/analysis/build/_analysis/sip_analysispart10.cpp
>> python/analysis/build/_analysis/sip_analysispart11.cpp
>> python/analysis/build/_analysis/sip_analysispart12.cpp
>> python/analysis/build/_analysis/sip_analysispart13.cpp
>> python/analysis/build/_analysis/sip_analysispart14.cpp
>> python/analysis/build/_analysis/sip_analysispart15.cpp
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart0.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart1.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart2.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart3.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart4.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart5.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart6.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart7.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart8.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart9.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart10.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart11.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart12.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart13.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart14.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart15.cpp 
>>
>>  cd /<<PKGBUILDDIR>>/debian/build/python/analysis && /usr/bin/cmake -E
>> echo && /usr/bin/sip-build --no-protected-is-public --pep484-pyi
>> --no-make --concatenate=16
>> --qmake=/usr/lib/i386-linux-gnu/qt5/bin/qmake
>> --include-dir=/<<PKGBUILDDIR>>/debian/build/python
>> --include-dir=/usr/lib/python3/dist-packages/PyQt5/bindings &&
>> /usr/bin/cmake -E touch
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart0.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart1.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart2.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart3.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart4.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart5.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart6.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart7.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart8.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart9.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart10.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart11.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart12.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart13.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart14.cpp 
>>
>> /<<PKGBUILDDIR>>/debian/build/python/analysis/build/_analysis/sip_analysispart15.cpp 
>>
>>
>>  Querying qmake about your Qt installation...
>>  These bindings will be built: analysis.
>>  Generating the analysis bindings...
>>  sip-build: An internal error occurred...
>>  Traceback (most recent call last):
>>    File "/usr/bin/sip-build", line 33, in <module>
>>      sys.exit(load_entry_point('sip==6.6.1', 'console_scripts', 
>> 'sip-build')())
>>    File "/usr/lib/python3/dist-packages/sipbuild/tools/build.py", line
>> 37, in main
>>      handle_exception(e)
>>    File "/usr/lib/python3/dist-packages/sipbuild/exceptions.py", line
>> 81, in handle_exception
>>      raise e
>>    File "/usr/lib/python3/dist-packages/sipbuild/tools/build.py", line
>> 34, in main
>>      project.build()
>>    File "/usr/lib/python3/dist-packages/sipbuild/project.py", line 
>> 249, in build
>>      self.builder.build()
>>    File "/usr/lib/python3/dist-packages/sipbuild/builder.py", line 
>> 48, in build
>>      self._generate_bindings()
>>    File "/usr/lib/python3/dist-packages/sipbuild/builder.py", line
>> 277, in _generate_bindings
>>      buildable = bindings.generate()
>>    File "/usr/lib/python3/dist-packages/sipbuild/bindings.py", line
>> 166, in generate
>>      spec, sip_files = parse(self.sip_file, SIP_VERSION, encoding,
>>    File
>> "/usr/lib/python3/dist-packages/sipbuild/generator/parser/parser.py",
>> line 35, in parse
>>      protected_is_public, include_dirs, strict).parse(sip_file)
>>    File
>> "/usr/lib/python3/dist-packages/sipbuild/generator/parser/parser_manager.py", 
>>
>> line 1454, in parse
>>      self._parser.parse(self._read(sip_file), lexer=self._lexer,
>>    File "/usr/lib/python3/dist-packages/ply/yacc.py", line 331, in parse
>>      return self.parseopt(input, lexer, debug, tracking, tokenfunc)
>>    File "/usr/lib/python3/dist-packages/ply/yacc.py", line 823, in 
>> parseopt
>>      p.callable(pslice)
>>    File
>> "/usr/lib/python3/dist-packages/sipbuild/generator/parser/rules.py",
>> line 2253, in p_opt_base_exception
>>      for xd in p.parser_manager.spec.exceptions:
>>  AttributeError: 'YaccProduction' object has no attribute 
>> 'parser_manager'
>>
>> https://buildd.debian.org/status/fetch.php?pkg=qgis&arch=i386&ver=3.22.6%2Bdfsg-1%7Eexp1&stamp=1650482571&raw=0 
>>
>>
>> This change seems to be the cause:
>>
>>    * Build-depend on python3-ply instead of bison and flex.
>>
>> Kind Regards,
>>
>> Bas
>>
>> ----- End forwarded message -----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sip6-fix-yacc-exception.patch
Type: text/x-patch
Size: 3743 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220425/d994a544/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgis-buildlog.txt.gz
Type: application/gzip
Size: 315449 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220425/d994a544/attachment-0001.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220425/d994a544/attachment-0001.sig>


More information about the PyQt mailing list