[Qgis-developer] Make error - QGIS Latest (2.6.0) and QGIS 2.8.1 too

jerome lefevre jerome.lefevre at ird.fr
Sun Mar 22 04:22:06 PDT 2015


Hi,

I manage to compile without error 2.8.1 on Centos 6.5 with python 
2.6.6.
Please see my notes here :
http://gis.stackexchange.com/questions/139693/half-solved-compilation-of-qgis-2-8-against-grass-7-from-source-with-centos6-5
(also repeated later below)

But at the runtime, I have the same error like Mark Wynter, described 
in 
http://lists.osgeo.org/pipermail/qgis-developer/2014-November/035397.html

a pop-up with "Couldn't load plugin 'processing'

Traceback (most recent call last):
   File "/usr/local/share/qgis/python/qgis/utils.py", line 185, in 
loadPlugin
     __import__(packageName)
   File "/usr/local/share/qgis/python/qgis/utils.py", line 460, in 
_import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File "/usr/local/share/qgis/python/plugins/processing/__init__.py", 
line 29, in
     from processing.tools.general import *
   File "/usr/local/share/qgis/python/qgis/utils.py", line 460, in 
_import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File 
"/usr/local/share/qgis/python/plugins/processing/tools/general.py", 
line 29, in
     from processing.core.Processing import Processing
   File "/usr/local/share/qgis/python/qgis/utils.py", line 460, in 
_import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File 
"/usr/local/share/qgis/python/plugins/processing/core/Processing.py", 
line 47, in
     from processing.modeler.ModelerAlgorithmProvider import \
   File "/usr/local/share/qgis/python/qgis/utils.py", line 460, in 
_import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File 
"/usr/local/share/qgis/python/plugins/processing/modeler/ModelerAlgorithmProvider.py", 
line 35, in
     from processing.modeler.ModelerAlgorithm import ModelerAlgorithm
   File "/usr/local/share/qgis/python/qgis/utils.py", line 460, in 
_import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File 
"/usr/local/share/qgis/python/plugins/processing/modeler/ModelerAlgorithm.py", 
line 100
     return {k:v for k,v in self.__dict__.iteritems() if  not 
k.startswith("_")}
                   ^
SyntaxError: invalid syntax


Any Clue ?  I use python 2.6.6.

Cheers
Jerome



half-solved-compilation-of-qgis-2-8-against-grass-7-from-source-with-centos6-5
-----------------------------------------------------------------------------------------------------------

Not very clear how to set variables with ccmake in the QGIS project 
2.8.1, but now I learn that library paths need to be complete, i.e. :

Not : -DSPATIALITE_LIBRARY:string=/usr/local/lib

But : -DSPATIALITE_LIBRARY:string=/usr/local/lib/libspatialite.so

Then, my new command line for ccmake is :

     cmake .. 
-DGEOS_CONFIG:string=/opt/intel/geos-3.4.2/bin/geos-config \
-DGDAL_CONFIG:string=/opt/intel/gdal-1.10_base/bin/gdal-config \
-DPOSTGRES_LIBRARY:string=/vol2/sql_soft/pgsql/lib/libpq.so \
-DPOSTGRES_INCLUDE_DIR:string=/vol2/sql_soft/pgsql/include \
-DGRASS_INCLUDE_DIR:string=/vol2/my_GRASS/grass-7/grass-7.0.0/include 
\
-DGRASS_PREFIX:string=/vol2/my_GRASS/grass-7/grass-7.0.0 \
-DGRASS_LIBRARY:string=/vol2/my_GRASS/grass-7/grass-7.0.0/lib \
-DGSL_CONFIG:string=/opt/intel/gsl/bin/gsl-config \
-DPROJ_INCLUDE_DIR:string=/opt/proj-4.8.0/include \
-DPROJ_LIBRARY:string=/opt/proj-4.8.0/lib/libproj.so \
-DQSCINTILLA_INCLUDE_DIR:string=/usr/local/Trolltech/Qt-4.8.6/include 
\
-DQSCINTILLA_LIBRARY:string=/usr/local/Trolltech/Qt-4.8.6/lib/libqscintilla2.so 
\
-DQWT_INCLUDE_DIR:string=/usr/local/qwt-6.0.2/include \
-DQWT_LIBRARY:string=/usr/local/qwt-6.0.2/lib/libqwt.so \
-DQSCI_SIP_DIR:string=/usr/include/Qsci \
-DSPATIALITE_INCLUDE_DIR:string=/usr/local/include \
-DSPATIALITE_LIBRARY:string=/usr/local/lib/libspatialite.so \
-DSPATIALINDEX_INCLUDE_DIR:string=/usr/local/include/spatialindex \
-DSPATIALINDEX_LIBRARY:string=/usr/local/lib/libspatialindex.so \
-DQWTPOLAR_INCLUDE_DIR:string=/usr/local/qwtpolar-1.0.0/include \
-DQWTPOLAR_LIBRARY:string=/usr/local/qwtpolar-1.0.0/lib/libqwtpolar.so

And now, several errors previously reported at the compiling stage are 
resolved (not detailled here).

ERROR due to a "wrong" version of Qscientilla was also resolved 
(related to my OS, centOS 6.5, the version of Qscintilla was not 
specified in INSTALL notes) :

Building CXX object 
src/gui/CMakeFiles/qgis_gui.dir/qgscodeeditor.cpp.o
/vol2/my_GRASS/grass-7/src/qgis-2.8.1/src/gui/qgscodeeditor.cpp: In 
member
function 'void QgsCodeEditor::insertText(QString)':
/vol2/my_GRASS/grass-7/src/qgis-2.8.1/src/gui/qgscodeeditor.cpp:114: 
error: 'replaceSelectedText' was not declared in this scope
make[2]: *** [src/gui/CMakeFiles/qgis_gui.dir/qgscodeeditor.cpp.o] 
Error 1

The solution is described here : 
http://lists.osgeo.org/pipermail/qgis-developer/2014-November/035370.html 
Where you can read that QGIS 2.8 needs Qscintilla >> 2.5 !! 
(apparently, replaceSelectedText() was added since this version) So, 
in my case I get QScintilla-gpl-2.8.tar.gz and compile it from source 
(because there is no package for centos6.5)

ERROR due to the support of GRASS 7 in QGIS 2.8.1

At step :

[ 47%] Building CXX object 
src/providers/grass/CMakeFiles/qgisgrass.dir    /qgsgrass.cpp.o
CMakeFiles/qgisgrass.dir/qgsgrass.cpp.o -c 
/vol2/my_GRASS/grass-7/src/qgis-2.8.1/src/providers/grass/qgsgrass.cpp
/vol2/my_GRASS/grass-7/src/qgis-2.8.1/src/providers/grass/qgsgrass.cpp: 
In static member function 'static void QgsGrass::setMapset(QString, 
QString, QString)':
/vol2/my_GRASS/grass-7/src/qgis-2.8.1/src/providers/grass/qgsgrass.cpp:383: 
error: 'G__setenv' was not declared in this scope

The solution is described here 
:http://osdir.com/ml/qgis-user-gis/2015-03/msg00151.html and follow 
the link inside that post.You need to apply patches on 
src/providers/grass/qgsgrass.cpp and src/providers/grass/qgsgrass.h in 
the QGIS src trre ion order to compile GGIS against GRASS 7) Note that 
the post aboves say that QGIS 2.8.1 do not support Grass vectors map 
previously created with the grass 6 topology [May be a conversion from 
the old grass 6 to grass 7 topology should be applied (see 
Convert_all_GRASS_6_vector_maps_to_GRASS_7, from grasswiki.osgeo.org 
for further reading), not tested and not the subject here]

The last ERROR, at step :

[ 84%] Generating gui/sip_guipart0.cpp, gui/sip_guipart1.cpp, 
gui/sip_guipart2.cpp, gui/sip_guipart3.cpp
sip: Unable to find file "Qsci/qscimod4.sip"
make[2]: *** [python/gui/sip_guipart0.cpp] Error 1

EDIT : When I installed QScintilla-gpl-2.8 from source, I forgot to 
build the (Python binding for QScintilla2 (no extension Qsci for pyQT4 
in /usr/share/sip/PyQt4). To fix that :

cd QScintilla-gpl-2.8/Python ; python configure.py ; make make install
check out by trying to import PyQt4.Qsci from python (it works)

Now QGIS compile like a charm without any error from a clean build 
tree
 


More information about the Qgis-developer mailing list