Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"PyCapsule_GetPointer called with incorrect name" when trying to build master #27304

Closed
qgib opened this issue Jul 24, 2018 · 3 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@qgib
Copy link
Contributor

qgib commented Jul 24, 2018

Author Name: Johannes Kroeger (Johannes Kroeger)
Original Redmine Issue: 19476
Affected QGIS version: 3.3(master)
Redmine category:build/install


I am trying to compile QGIS from Git master on Archlinux.

python-sip 4.19.12-4
python-sip-pyqt5 4.19.12-4
sip 4.19.12-4
pyqt5-common 5.11.2-1
python-pyqt5 5.11.2-1

[ 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[2]: *** [python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:74: python/plugins/db_manager/ui_DlgAddGeometryColumn.py] Error 1
make[1]: *** [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...


@qgib
Copy link
Contributor Author

qgib commented Jul 25, 2018

Author Name: Nyall Dawson (@nyalldawson)


Not a qgis issue - see https://riverbankcomputing.com/pipermail/pyqt/2018-June/040474.html


  • resolution was changed from to up/downstream
  • status_id was changed from Open to Rejected

@qgib qgib closed this as completed Jul 25, 2018
@qgib
Copy link
Contributor Author

qgib commented Aug 1, 2018

Author Name: Chris Clayton (@chris2553)


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!


  • 13041 was configured as qgis-3.2.1-fix-sip-name.patch

@qgib
Copy link
Contributor Author

qgib commented Aug 4, 2018

Author Name: Johannes Kroeger (Johannes Kroeger)


Thank you so much, works perfectly.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

1 participant