Bug report #16032
python/core/sip_corepart0.cpp:18732:28: error: ‘QGeoSatelliteInfo’ was not declared in this scope
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Build/Install | ||
Affected QGIS version: | 2.18.2 | Regression?: | No |
Operating System: | arch linux | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23947 |
Description
Building qgis 2.18.2, I get the error
python/core/sip_corepart0.cpp:18732:28: error: ‘QGeoSatelliteInfo’ was not declared in this scope
A quick workaround is to comment out the line
%Include gps/qgsqtlocationconnection.sip
in the file
src/core/qgis.h
(patch attached).
For information, my complete build command:
mkdir build cd build _pyqt4_sip_dir="/usr/share/sip/PyQt4" cmake -G "Unix Makefiles" ../ \\ -DCMAKE_INSTALL_PREFIX=/usr \\ -DQGIS_MANUAL_SUBDIR=share/man \\ -DENABLE_TESTS=FALSE \\ -DCMAKE_SKIP_RPATH=TRUE \\ -DPYTHON_EXECUTABLE=/usr/bin/python2 \\ -DWITH_INTERNAL_{DATEUTIL,FUTURE,HTTPLIB2,JINJA2,NOSE2,OWSLIB,PYGMENTS,PYTZ,QWTPOLAR,SIX,WEBKIT_BINDINGS,YAML}=OFF \\ -DWITH_INTERNAL_{QEXTSERIALPORT}=ON \\ -DPYQT4_SIP_DIR="${_pyqt4_sip_dir}" \\ -DWITH_SERVER=ON \\ -DWITH_GLOBE=ON \\ -DWITH_SERVER=ON \\ -DWITH_GLOBE=ON \\ -DWITH_GRASS=OFF \\ -DWITH_GRASS7=ON \\ -DGRASS_PREFIX7=/opt/grass \\ -DWITH_APIDOC=OFF \\ -DWITH_ASTYLE=OFF \\ -DWITH_BINDINGS=ON \\ -DWITH_CUSTOM_WIDGETS=ON \\ -DWITH_DESKTOP=ON \\ -DWITH_ORACLE=OFF \\ -DWITH_POSTGRESQL=ON \\ -DWITH_PYSPATIALITE=ON \\ -DWITH_QSPATIALITE=ON \\ -DWITH_QTMOBILITY=ON \\ -DWITH_QTWEBKIT=ON \\ -DWITH_QWTPOLAR=ON \\ -DWITH_STAGED_PLUGINS=ON \\ -DWITH_TOUCH=ON \\ -DWITH_TXT2TAGS_PDF=OFF \\ msg "Applying a dirty fix for a configuration system error ..." sed -i "s| /usr/share/sip | ${_pyqt4_sip_dir} |" python/CMakeFiles/{python_module_qgis__analysis,python_module_qgis__gui,python_module_qgis__server,generate_sip_qgis._analysis_cpp_files,python_module_qgis__core,generate_sip_qgis._core_cpp_files,generate_sip_qgis._gui_cpp_files,generate_sip_qgis._networkanalysis_cpp_files,python_module_qgis__networkanalysis}.dir/build.make make
History
#1 Updated by Drei Eck almost 8 years ago
A bit more context of the make output when the error occurs:
[...] Scanning dependencies of target python_module_qgis__core [ 97%] Building CXX object python/CMakeFiles/python_module_qgis__core.dir/core/sip_corepart0.cpp.o /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp: In function ‘void assign_QList_0100QGeoSatelliteInfo(void*, Py_ssize_t, const void*)’: /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:28: error: ‘QGeoSatelliteInfo’ was not declared in this scope ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:45: error: template argument 1 is invalid ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:47: error: expected ‘>’ before ‘*’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:47: error: expected ‘(’ before ‘*’ token /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:48: error: expected primary-expression before ‘>’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:67: error: ‘void*’ is not a pointer-to-object type ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:101: error: the value of ‘QGeoSatelliteInfo’ is not usable in a constant expression ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:28: note: ‘QGeoSatelliteInfo’ was not declared ‘constexpr’ ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:118: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’ ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:118: note: expected a type, got ‘QGeoSatelliteInfo’ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:120: error: expected ‘>’ before ‘*’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:120: error: expected ‘(’ before ‘*’ token /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:121: error: expected primary-expression before ‘>’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:130: error: expected ‘)’ before ‘;’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18732:130: error: expected ‘)’ before ‘;’ token /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp: In function ‘void* array_QList_0100QGeoSatelliteInfo(Py_ssize_t)’: /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18739:22: error: ‘QGeoSatelliteInfo’ was not declared in this scope ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18739:39: error: template argument 1 is invalid ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18739:40: error: expected ‘;’ before ‘[’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp: In lambda function: /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18739:51: error: expected ‘{’ before ‘;’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp: In function ‘void* copy_QList_0100QGeoSatelliteInfo(const void*, Py_ssize_t)’: /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:22: error: ‘QGeoSatelliteInfo’ was not declared in this scope ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:39: error: template argument 1 is invalid ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:70: error: the value of ‘QGeoSatelliteInfo’ is not usable in a constant expression ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:22: note: ‘QGeoSatelliteInfo’ was not declared ‘constexpr’ ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:87: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’ ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:87: note: expected a type, got ‘QGeoSatelliteInfo’ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:89: error: expected ‘>’ before ‘*’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:89: error: expected ‘(’ before ‘*’ token /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:90: error: expected primary-expression before ‘>’ token ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18746:109: error: ‘const void*’ is not a pointer-to-object type ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp: In function ‘void release_QList_0100QGeoSatelliteInfo(void*, int)’: /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18755:35: error: ‘QGeoSatelliteInfo’ was not declared in this scope } ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18755:52: error: template argument 1 is invalid } ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18755:54: error: expected ‘>’ before ‘*’ token } ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18755:54: error: expected ‘(’ before ‘*’ token /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18755:55: error: expected primary-expression before ‘>’ token } ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18755:61: error: expected ‘)’ before ‘;’ token } ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp: In function ‘int convertTo_QList_0100QGeoSatelliteInfo(PyObject*, void**, int*, PyObject*)’: /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:11: error: ‘QGeoSatelliteInfo’ was not declared in this scope #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^~~~~~~~~~~~~~~~~ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:28: error: template argument 1 is invalid #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:67: error: the value of ‘QGeoSatelliteInfo’ is not usable in a constant expression #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:11: note: ‘QGeoSatelliteInfo’ was not declared ‘constexpr’ #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^~~~~~~~~~~~~~~~~ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:84: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’ #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:84: note: expected a type, got ‘QGeoSatelliteInfo’ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:86: error: expected ‘>’ before ‘*’ token #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:86: error: expected ‘(’ before ‘*’ token /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:88: error: expected primary-expression before ‘>’ token #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:101: error: expected ‘)’ before ‘;’ token #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:70:56: error: ‘sipType_QGeoSatelliteInfo’ was not declared in this scope bool ok = (itm && sipCanConvertToType(itm, sipType_TYPE, SIP_NOT_NONE)); ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:81:11: error: the value of ‘QGeoSatelliteInfo’ is not usable in a constant expression QList<TYPE> *ql = new QList<TYPE>; ^~~~~~~~~~~~~~~~~ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:11: note: ‘QGeoSatelliteInfo’ was not declared ‘constexpr’ #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^~~~~~~~~~~~~~~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:81:28: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’ QList<TYPE> *ql = new QList<TYPE>; ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:81:28: note: expected a type, got ‘QGeoSatelliteInfo’ /usr/share/sip/PyQt4/QtCore/qlist.sip:81:46: error: the value of ‘QGeoSatelliteInfo’ is not usable in a constant expression QList<TYPE> *ql = new QList<TYPE>; ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18764:11: note: ‘QGeoSatelliteInfo’ was not declared ‘constexpr’ #line 59 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^~~~~~~~~~~~~~~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:81:63: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’ QList<TYPE> *ql = new QList<TYPE>; ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:81:63: note: expected a type, got ‘QGeoSatelliteInfo’ /usr/share/sip/PyQt4/QtCore/qlist.sip:88:28: error: ‘t’ was not declared in this scope TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:88:49: error: ‘QGeoSatelliteInfo’ does not name a type TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); ^~~~~~~~~~~~~~~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:88:67: error: expected ‘>’ before ‘*’ token TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:88:67: error: expected ‘(’ before ‘*’ token /usr/share/sip/PyQt4/QtCore/qlist.sip:88:68: error: expected primary-expression before ‘>’ token TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:88:92: error: ‘sipType_QGeoSatelliteInfo’ was not declared in this scope TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:88:167: error: expected ‘)’ before ‘;’ token TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:100:13: error: request for member ‘append’ in ‘* ql’, which is of non-class type ‘int’ ql->append(*t); ^~~~~~ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp: In function ‘PyObject* convertFrom_QList_0100QGeoSatelliteInfo(void*, PyObject*)’: /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:10: error: ‘QGeoSatelliteInfo’ was not declared in this scope #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^~~~~~~~~~~~~~~~~ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:27: error: template argument 1 is invalid #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:62: error: the value of ‘QGeoSatelliteInfo’ is not usable in a constant expression #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:10: note: ‘QGeoSatelliteInfo’ was not declared ‘constexpr’ #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^~~~~~~~~~~~~~~~~ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:79: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’ #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:79: note: expected a type, got ‘QGeoSatelliteInfo’ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:81: error: expected ‘>’ before ‘*’ token #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:81: error: expected ‘(’ before ‘*’ token /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:82: error: expected primary-expression before ‘>’ token #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /tmp/qgis/src/qgis-2.18.2/build/python/core/sip_corepart0.cpp:18823:92: error: expected ‘)’ before ‘;’ token #line 32 "/usr/share/sip/PyQt4/QtCore/qlist.sip" ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:35:33: error: request for member ‘size’ in ‘* sipCpp’, which is of non-class type ‘int’ if ((l = PyList_New(sipCpp->size())) == NULL) ^~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:39:33: error: request for member ‘size’ in ‘* sipCpp’, which is of non-class type ‘int’ for (int i = 0; i < sipCpp->size(); ++i) ^~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:41:28: error: ‘t’ was not declared in this scope TYPE *t = new TYPE(sipCpp->at(i)); ^ /usr/share/sip/PyQt4/QtCore/qlist.sip:41:36: error: expected type-specifier before ‘QGeoSatelliteInfo’ TYPE *t = new TYPE(sipCpp->at(i)); ^~~~~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:44:46: error: ‘sipType_QGeoSatelliteInfo’ was not declared in this scope if ((tobj = sipConvertFromNewType(t, sipType_TYPE, sipTransferObj)) == NULL) ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/share/sip/PyQt4/QtCore/qlist.sip:47:20: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete t; ^ make[2]: *** [python/CMakeFiles/python_module_qgis__core.dir/build.make:394: python/CMakeFiles/python_module_qgis__core.dir/core/sip_corepart0.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:4295: python/CMakeFiles/python_module_qgis__core.dir/all] Error 2 make: *** [Makefile:150: all] Error 2
... and the output of the cmake
-run, before make
, is:
-- QGIS version: 2.18.2 Las Palmas (21802) -- Found GRASS 7: /opt/grass (7.0.5, off_t size = ) -- Found Proj: /usr/lib64/libproj.so -- Found GEOS: /usr/lib/libgeos_c.so (3.5.0) -- Found GDAL: /usr/lib/libgdal.so (2.1.1) -- Found Expat: /lib64/libexpat.so -- Found Spatialindex: /usr/lib64/libspatialindex.so -- Found Qwt: /usr/lib64/libqwt.so (6.1.3) -- Found Sqlite3: /usr/lib64/libsqlite3.so -- Found PostgreSQL: /usr/lib/libpq.so -- Found SpatiaLite: /usr/lib64/libspatialite.so -- Qt WebKit support enabled -- Found Qt version: 4.8.7 -- Using QtMobility version: system's default -- QtMobility version: 1.2.0 -- Touch support enabled -- Found QScintilla2: /usr/lib64/libqscintilla2.so (2.9.3) -- Found QCA: /usr/lib64/libqca.so (2.1.1) -- Found QCA OpenSSL plugin -- Pedantic compiler settings enabled -- Found Python executable: /usr/bin/python2 -- Found Python version: 2.7.13 -- Found Python library: /usr/lib64/libpython2.7.so -- Found PyQt4 version: 4.10.4-snapshot-e52357d82574 -- Found SIP version: 4.18.1 -- Found QScintilla2 PyQt module: 2.9.3 -- Found QwtPolar: /usr/lib64/libqwtpolar.so -- Found GSL: -L/usr/lib -lgsl -lgslcblas -lm -- Found FCGI: /usr/lib64/libfcgi.so -- Qsci sip file not found - disabling bindings for derived classes -- Configuring done -- Generating done -- Build files have been written to: /tmp/qgis/src/qgis-2.18.2/build
#2 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
- Regression? set to No
#3 Updated by matteo ghetta over 5 years ago
- Status changed from Open to Closed
- Description updated (diff)