Bug report #16343

2.18 build fails with latest sip/pyqt4

Added by Doug Newgard over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
Affected QGIS version:2.18.4 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24253

Description

Even after 85a0db24f32351f6096cd8282f03ad5c2f4e6ef5, build still fails with sip 4.19.1 and pyqt4 4.12

[ 91%] Generating ui_dialogAbout.py
Traceback (most recent call last):
  File "../../../../../scripts/pyuic-wrapper.py", line 26, in <module>
    import qgis.PyQt.uic.pyuic
  File "/home/dnewgard/PKGBUILDs/qgis/src/QGIS/build/output/python/qgis/__init__.py", line 27, in <m
odule>
    from qgis.core import QgsFeature, QgsGeometry
  File "/home/dnewgard/PKGBUILDs/qgis/src/QGIS/build/output/python/qgis/core/__init__.py", line 30,
in <module>
    from qgis._core import *
RuntimeError: qgis._core cannot import type 'QList<QVariant>' from PyQt4.QtCore
make[2]: *** [python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:118: p
ython/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
make[1]: *** [CMakeFiles/Makefile2:4667: python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-d
epend.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....++

Build of 2.14 succeeds, but has the same error at runtime, causing python support to be disabled.

History

#1 Updated by Shai Efrati over 3 years ago

More details and a workaround were published here: https://aur.archlinux.org/packages/qgis/ but Python support is still an issue.

#2 Updated by Doug Newgard over 3 years ago

Fedora has a patch that works: https://src.fedoraproject.org/cgit/rpms/qgis.git/plain/qgis_sip-ftbfs.patch

Second part has already been applied.

#3 Updated by Giovanni Manghi over 3 years ago

  • Regression? set to No
  • Easy fix? set to No

#4 Updated by Alexei Ardyakov over 3 years ago

The patch doesn't work for me:

[ 99%] Generating ui_dialogBase.py
make[2]: *** [python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:118: python/plugins/GdalTools/tools/ui_dialogAbout.py] Segmentation fault (core dumped)
make[2]: *** Deleting file 'python/plugins/GdalTools/tools/ui_dialogAbout.py'
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [python/plugins/db_manager/CMakeFiles/zzz-db_manager-18-depend.dir/build.make:73: python/plugins/db_manager/ui_DlgAddGeometryColumn.py] Segmentation fault (core dumped)
make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgAddGeometryColumn.py'
make[2]: *** [python/plugins/db_manager/db_plugins/postgis/plugins/versioning/CMakeFiles/zzz-db_manager-8-depend.dir/build.make:63: python/plugins/db_manager/db_plugins/postgis/plugins/versioning/ui_DlgVersioning.py] Segmentation fault (core dumped)
make[2]: *** Deleting file 'python/plugins/db_manager/db_plugins/postgis/plugins/versioning/ui_DlgVersioning.py'
make[2]: *** [python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:122: python/plugins/GdalTools/tools/ui_dialogBase.py] Segmentation fault (core dumped)
make[2]: *** Deleting file 'python/plugins/GdalTools/tools/ui_dialogBase.py'
make[1]: *** [CMakeFiles/Makefile2:5402: python/plugins/db_manager/db_plugins/postgis/plugins/versioning/CMakeFiles/zzz-db_manager-8-depend.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:4905: python/plugins/db_manager/CMakeFiles/zzz-db_manager-18-depend.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:4766: python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all] Error 2
[ 99%] Generating ui_console_history_dlg.py
[ 99%] Generating ui_console_compile_apis.py
[ 99%] Generating ui_console_settings.py
make[2]: *** [python/console/CMakeFiles/pyconsole.dir/build.make:63: python/console/ui_console_compile_apis.py] Segmentation fault (core dumped)
make[2]: *** Deleting file 'python/console/ui_console_compile_apis.py'
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [python/console/CMakeFiles/pyconsole.dir/build.make:71: python/console/ui_console_settings.py] Segmentation fault (core dumped)
make[2]: *** Deleting file 'python/console/ui_console_settings.py'
make[2]: *** [python/console/CMakeFiles/pyconsole.dir/build.make:67: python/console/ui_console_history_dlg.py] Segmentation fault (core dumped)
make[2]: *** Deleting file 'python/console/ui_console_history_dlg.py'
make[1]: *** [CMakeFiles/Makefile2:8484: python/console/CMakeFiles/pyconsole.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...


I tried to build 2.18.6 and 2.18.7, tried different thread count in MAKEFLAGS, with the same result.

#5 Updated by Alexei Ardyakov over 3 years ago

It turned out in my case segfault was caused by obsolete Arch Linux package kdebindings-python2. After removing it, QGIS compiles and runs well, so my report is probably unrelated to the main issue.

#6 Updated by Doug Newgard over 3 years ago

  • Status changed from Open to Closed

It appears that sip (or related packages) 4.19.3 fixed this

#7 Updated by Jürgen Fischer over 3 years ago

  • Description updated (diff)

#8 Updated by marisn - over 3 years ago

  • Status changed from Closed to Reopened
  • Operating System deleted (Arch Linux)

Sorry, it is not fixed by sip/PyQt upgrade. There is still necessity to also remove one line from qgscoordinatetransform.sip file (as suggested by Arch users).
python/core/qgscoordinatetransform.sip delete/uncomment 18th line: "extern PyObject *sipExportedExceptions__core2;"
Only then 2.18.10 (bd1f9bf93e) compiles with:
dev-python/sip-4.19.3
dev-python/PyQt4-4.12.1

#9 Updated by Doug Newgard over 3 years ago

  • Status changed from Reopened to Closed

Which is a completely different issue

Also available in: Atom PDF