Bug report #17198

2.18.13 (qt5,python3.5) build fails on "no Element >ob_type<" in pyspatiallite/src/connection.c / parallel make issue

Added by Ervin Peters over 6 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
Affected QGIS version:2.18.13 Regression?:No
Operating System:Gentoo Linux, mostly stable Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:25097

Description

I tried to build qgis-2.18.13 on my Gentoo Linux box with a modified ebuild, Python3.5 and qt5 (qt4 disabled)

The build fails:

Building C object python/ext-libs/pyspatialite/CMakeFiles/pyspatialite.dir/src/connection.c.o
cd /var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13_build/python/ext-libs/pyspatialite && /usr/bin/x86_64-pc-linux-gnu-gcc  -DQGIS_DISABLE_DEPRECATED -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_POSITIONING_LIB -DQT_PRINTSUPPORT_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DWITH_QTWEBKIT -Dpyspatialite_EXPORTS -I/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13_build -I/usr/include/python3.4m -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtWebKit -isystem /usr/include/qt5/QtWebKitWidgets -isystem /usr/include/qt5/QtSql -isystem /usr/include/qt5/QtPositioning   -DNDEBUG -march=broadwell -O2 -pipe -fPIC   -DCORE_EXPORT= -DGUI_EXPORT= -DPYTHON_EXPORT= -DANALYSIS_EXPORT= -DAPP_EXPORT= -DCUSTOMWIDGETS_EXPORT= -DSERVER_EXPORT= -DMODULE_NAME=\"spatialite.dbapi2\" -fPIC -w -o CMakeFiles/pyspatialite.dir/src/connection.c.o -c /var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c
/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c: In Funktion »pysqlite_connection_dealloc«:
/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c:304:9: Fehler: »pysqlite_Connection {aka struct <anonym>}« hat kein Element namens »ob_type«
     self->ob_type->tp_free((PyObject*)self);
         ^
/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c: In Funktion »pysqlite_connection_create_collation«:
/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c:1464:74: Fehler: »PyString_Type« nicht deklariert (erste Benutzung in dieser Funktion)
     if (!PyArg_ParseTuple(args, "O!O:create_collation(name, callback)", &PyString_Type, &name, &cal
                                                                          ^
/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c:1464:74: Anmerkung: jeder nicht deklarierte Bezeichner wird nur einmal für jede Funktion, in der er vorkommt, gemeldet
/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c: Auf höchster Ebene:
/var/tmp/portage/sci-geosciences/qgis-2.18.13-r2/work/qgis-2.18.13/python/ext-libs/pyspatialite/src/connection.c:1614:67: Fehler: »RO« ist hier nicht deklariert (nicht in einer Funktion)
     {"Warning", T_OBJECT, offsetof(pysqlite_Connection, Warning), RO},

googling for ob_type (the first error) and python3 gives me:

Another change in the object header is that the PyObject_HEAD macro has changed so that ob_type is now in a nested structure. This means you no longer can pick the ob_type directly from the struct, so code like ob->ob_type stops working. You should replace this with Py_TYPE(ob). The Py_TYPE macro doesn’t appear until Python 2.6, so to support earlier versions we make another #ifndef:

#ifndef Py_TYPE
    #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#endif

from http://python3porting.com/cextensions.html

It seems to me that it is a porting to python3 issue.

Also there is a parallel make problem in linking the gui:

[ 59%] Linking CXX shared library ../../output/lib64/libqgis_gui.so

[...]

cd /var/tmp/portage/sci-geosciences/qgis-2.18.12-r100/work/qgis-2.18.12_build/src/gui && /usr/bin/cmake -E cmake_symlink_library ../../output/lib64/libqgis_gui.so.2.18.12 ../../output/lib64/libqgis_gui.so.2.18.12 ../../output/lib64/libqgis_gui.so
make[2]: Verzeichnis „/var/tmp/portage/sci-geosciences/qgis-2.18.12-r100/work/qgis-2.18.12_build“ wird verlassen
[ 59%] Built target qgis_gui
make[1]: Verzeichnis „/var/tmp/portage/sci-geosciences/qgis-2.18.12-r100/work/qgis-2.18.12_build“ wird verlassen
make: *** [Makefile:150: all] Fehler 2

Running with the build with -j1 as MAKEOPTS the build process goes further.

ervin

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Category changed from Data Provider/SpatiaLite to Build/Install

#2 Updated by Ervin Peters over 5 years ago

  • Status changed from Open to Closed

meaningless, QGIS3 is available and working more or less perfectly

#3 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to invalid

Also available in: Atom PDF