[QGIS-Developer] Problems building QGIS 3.26 using Python 3.10.5 and SIP 6.6.2

Hernán De Angelis variablestarlight at gmail.com
Tue Jun 28 08:50:12 PDT 2022


Hi developers,

I am trying to understand some errors I get while building either QGIS 
3.26 or the latest main branch from GitHub in openSUSE Tumbleweed. I 
normally compile the latest source every few weeks and normally things 
go fine. Last few times I compiled Python was 3.8 and 3.9 and there were 
no problems. However, recently this distribution I use has made Python3 
= 3.10.5. SIP is 6.6.2. To my knowledge all other dependencies are 
satisfied. I wonder if the change in Python or SIP versions may have 
introduced some known incompatibility. Errors are listed below. Any hint 
is appreciated.

Thanks in advance

/H.

sip-build: An internal error occurred...
Traceback (most recent call last):
   File "/bin/sip-build", line 33, in <module>
     sys.exit(load_entry_point('sip==6.6.2', 'console_scripts', 
'sip-build')())
   File "/usr/lib64/python3.10/site-packages/sipbuild/tools/build.py", 
line 37, in main
     handle_exception(e)
   File "/usr/lib64/python3.10/site-packages/sipbuild/exceptions.py", 
line 81, in handle_exception
     raise e
   File "/usr/lib64/python3.10/site-packages/sipbuild/tools/build.py", 
line 34, in main
     project.build()
   File "/usr/lib64/python3.10/site-packages/sipbuild/project.py", line 
244, in build
     self.builder.build()
   File "/usr/lib64/python3.10/site-packages/sipbuild/builder.py", line 
48, in build
     self._generate_bindings()
   File "/usr/lib64/python3.10/site-packages/sipbuild/builder.py", line 
277, in _generate_bindings
     buildable = bindings.generate()
   File "/usr/lib64/python3.10/site-packages/sipbuild/bindings.py", line 
166, in generate
     spec, sip_files = parse(self.sip_file, SIP_VERSION, encoding,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser.py", 
line 35, in parse
     protected_is_public, include_dirs, strict).parse(sip_file)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser_manager.py", 
line 1507, in parse
     self._parser.parse(self._read(sip_file, raw_sip_file),
   File "/usr/lib/python3.10/site-packages/ply/yacc.py", line 331, in parse
     return self.parseopt(input, lexer, debug, tracking, tokenfunc)
   File "/usr/lib/python3.10/site-packages/ply/yacc.py", line 823, in 
parseopt
     p.callable(pslice)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/rules.py", 
line 3029, in p_typedef_decl
     instantiated = pm.instantiate_class_template(p, name_symbol,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser_manager.py", 
line 1480, in instantiate_class_template
     instantiate_class(p, symbol, fq_cpp_name, tmpl_names, proto_class,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 131, in instantiate_class
     i_class.ctors = _instantiate_ctors(tmpl_names, proto_class, template,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 235, in _instantiate_ctors
     i_ctor.py_signature = _instantiate_signature(proto_ctor.py_signature,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 368, in _instantiate_signature
     i_arg = _instantiate_argument(proto_arg, proto_class, tmpl_names,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 191, in _instantiate_argument
     i_arg.default_value = [_instantiate_value(v, expansions)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 191, in <listcomp>
     i_arg.default_value = [_instantiate_value(v, expansions)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 437, in _instantiate_value
     i_name = ScopedName.parse(template_string(proto_name, expansions))
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/templates.py", 
line 201, in template_string
     proto_str = proto_str.replace(name, value)
AttributeError: 'ScopedName' object has no attribute 'replace'
make[2]: *** 
[python/CMakeFiles/python_module_qgis__analysis.dir/build.make:853: 
python/analysis/build/_analysis/sip_analysispart0.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:5790: 
python/CMakeFiles/python_module_qgis__analysis.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....


sip-build: An internal error occurred...
Traceback (most recent call last):
   File "/bin/sip-build", line 33, in <module>
     sys.exit(load_entry_point('sip==6.6.2', 'console_scripts', 
'sip-build')())
   File "/usr/lib64/python3.10/site-packages/sipbuild/tools/build.py", 
line 37, in main
     handle_exception(e)
   File "/usr/lib64/python3.10/site-packages/sipbuild/exceptions.py", 
line 81, in handle_exception
     raise e
   File "/usr/lib64/python3.10/site-packages/sipbuild/tools/build.py", 
line 34, in main
     project.build()
   File "/usr/lib64/python3.10/site-packages/sipbuild/project.py", line 
244, in build
     self.builder.build()
   File "/usr/lib64/python3.10/site-packages/sipbuild/builder.py", line 
48, in build
     self._generate_bindings()
   File "/usr/lib64/python3.10/site-packages/sipbuild/builder.py", line 
277, in _generate_bindings
     buildable = bindings.generate()
   File "/usr/lib64/python3.10/site-packages/sipbuild/bindings.py", line 
166, in generate
     spec, sip_files = parse(self.sip_file, SIP_VERSION, encoding,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser.py", 
line 35, in parse
     protected_is_public, include_dirs, strict).parse(sip_file)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser_manager.py", 
line 1507, in parse
     self._parser.parse(self._read(sip_file, raw_sip_file),
   File "/usr/lib/python3.10/site-packages/ply/yacc.py", line 331, in parse
     return self.parseopt(input, lexer, debug, tracking, tokenfunc)
   File "/usr/lib/python3.10/site-packages/ply/yacc.py", line 823, in 
parseopt
     p.callable(pslice)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/rules.py", 
line 3029, in p_typedef_decl
     instantiated = pm.instantiate_class_template(p, name_symbol,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser_manager.py", 
line 1480, in instantiate_class_template
     instantiate_class(p, symbol, fq_cpp_name, tmpl_names, proto_class,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 131, in instantiate_class
     i_class.ctors = _instantiate_ctors(tmpl_names, proto_class, template,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 235, in _instantiate_ctors
     i_ctor.py_signature = _instantiate_signature(proto_ctor.py_signature,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 368, in _instantiate_signature
     i_arg = _instantiate_argument(proto_arg, proto_class, tmpl_names,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 191, in _instantiate_argument
     i_arg.default_value = [_instantiate_value(v, expansions)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 191, in <listcomp>
     i_arg.default_value = [_instantiate_value(v, expansions)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 437, in _instantiate_value
     i_name = ScopedName.parse(template_string(proto_name, expansions))
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/templates.py", 
line 201, in template_string
     proto_str = proto_str.replace(name, value)
AttributeError: 'ScopedName' object has no attribute 'replace'
make[2]: *** 
[python/CMakeFiles/python_module_qgis__core.dir/build.make:804: 
python/core/build/_core/sip_corepart0.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:5683: 
python/CMakeFiles/python_module_qgis__core.dir/all] Error 2


sip-build: An internal error occurred...
Traceback (most recent call last):
   File "/bin/sip-build", line 33, in <module>
     sys.exit(load_entry_point('sip==6.6.2', 'console_scripts', 
'sip-build')())
   File "/usr/lib64/python3.10/site-packages/sipbuild/tools/build.py", 
line 37, in main
     handle_exception(e)
   File "/usr/lib64/python3.10/site-packages/sipbuild/exceptions.py", 
line 81, in handle_exception
     raise e
   File "/usr/lib64/python3.10/site-packages/sipbuild/tools/build.py", 
line 34, in main
     project.build()
   File "/usr/lib64/python3.10/site-packages/sipbuild/project.py", line 
244, in build
     self.builder.build()
   File "/usr/lib64/python3.10/site-packages/sipbuild/builder.py", line 
48, in build
     self._generate_bindings()
   File "/usr/lib64/python3.10/site-packages/sipbuild/builder.py", line 
277, in _generate_bindings
     buildable = bindings.generate()
   File "/usr/lib64/python3.10/site-packages/sipbuild/bindings.py", line 
166, in generate
     spec, sip_files = parse(self.sip_file, SIP_VERSION, encoding,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser.py", 
line 35, in parse
     protected_is_public, include_dirs, strict).parse(sip_file)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser_manager.py", 
line 1507, in parse
     self._parser.parse(self._read(sip_file, raw_sip_file),
   File "/usr/lib/python3.10/site-packages/ply/yacc.py", line 331, in parse
     return self.parseopt(input, lexer, debug, tracking, tokenfunc)
   File "/usr/lib/python3.10/site-packages/ply/yacc.py", line 823, in 
parseopt
     p.callable(pslice)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/rules.py", 
line 3029, in p_typedef_decl
     instantiated = pm.instantiate_class_template(p, name_symbol,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/parser_manager.py", 
line 1480, in instantiate_class_template
     instantiate_class(p, symbol, fq_cpp_name, tmpl_names, proto_class,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 131, in instantiate_class
     i_class.ctors = _instantiate_ctors(tmpl_names, proto_class, template,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 235, in _instantiate_ctors
     i_ctor.py_signature = _instantiate_signature(proto_ctor.py_signature,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 368, in _instantiate_signature
     i_arg = _instantiate_argument(proto_arg, proto_class, tmpl_names,
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 191, in _instantiate_argument
     i_arg.default_value = [_instantiate_value(v, expansions)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 191, in <listcomp>
     i_arg.default_value = [_instantiate_value(v, expansions)
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/parser/instantiations.py", 
line 437, in _instantiate_value
     i_name = ScopedName.parse(template_string(proto_name, expansions))
   File 
"/usr/lib64/python3.10/site-packages/sipbuild/generator/templates.py", 
line 201, in template_string
     proto_str = proto_str.replace(name, value)
AttributeError: 'ScopedName' object has no attribute 'replace'
make[2]: *** 
[python/CMakeFiles/python_module_qgis__gui.dir/build.make:1253: 
python/gui/build/_gui/sip_guipart0.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:5737: 
python/CMakeFiles/python_module_qgis__gui.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220628/43e5e8ef/attachment-0001.htm>


More information about the QGIS-Developer mailing list