Bug report #19476
"PyCapsule_GetPointer called with incorrect name" when trying to build master
|Affected QGIS version:||3.3(master)||Regression?:||No|
|Operating System:||Linux||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||up/downstream|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||27304|
I am trying to compile QGIS from Git master on Archlinux.
[ 98%] Built target pyutils [ 98%] Built target pyqtcompat [ 98%] Built target pygui [ 98%] Generating ui_DlgAddGeometryColumn.py Traceback (most recent call last): File "../../../../scripts/pyuic-wrapper.py", line 26, in <module> import qgis.PyQt.uic.pyuic File "/home/qgis/.cache/aurman/qgis-git/src/qgis/build/output/python/qgis/__init__.py", line 80, in <module> import qgis.gui File "/home/qgis/.cache/aurman/qgis-git/src/qgis/build/output/python/qgis/gui/__init__.py", line 27, in <module> from qgis._gui import * ValueError: PyCapsule_GetPointer called with incorrect name make: *** [python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:74: python/plugins/db_manager/ui_DlgAddGeometryColumn.py] Error 1 make: *** [CMakeFiles/Makefile2:4143: python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/all] Error 2 make: *** [Makefile:152: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...
#1 Updated by Nyall Dawson over 1 year ago
- Resolution set to up/downstream
- Status changed from Open to Rejected
Not a qgis issue - see https://riverbankcomputing.com/pipermail/pyqt/2018-June/040474.html
#2 Updated by Chris Clayton over 1 year ago
- File qgis-3.2.1-fix-sip-name.patch added
I too have been having trouble building QGIS - 3.2.1 in my case. I think I've tracked this issue down. I think it happens if the --sip-module is passed to configure.py when building sip. Riverbank Computing seem keen that the argument should be used to build private copies of the sip module - private will be mandatory from sip 5 (see http://pyqt.sourceforge.net/Docs/sip4/using.html#ref-private-sip). I blindly followed that line and found myself getting this error. I added some debugging to python3 to print the correct and incorrect names and found that they are "PyQt5.sip" and "sip". grepping the python code in qgis revealed that, at least in some places, the sip module name is hard coded as "sip".
The attached patch allowed the build to complete. Additionally, the changes to the two python source files allow qgis to run without having to use the PYTHONPATH environment variable so that the private module can be imported.
So, it would appear that folks may or may not run into this issue depending on how they (or their distro maintainers) build sip and the order in which sip, PyQt5, QGIS and, maybe, qscintilla are built. Ouch!