Bug report #8507

QGIS trunk failed to compile with sip 4.15

Added by Xavier Fung almost 11 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:Xavier Fung
Category:Build/Install
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17267

Description

Upgraded to sip 4.15 from Arch and trunk cannot be compiled with this error message.

Scanning dependencies of target python_module_qgis_core
[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart0.cpp.o
[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart1.cpp.o       
/home/xavier/dev/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp: In member function ‘virtual bool sipQgsPseudoColorShader::shade(double, int*, int*, int*, int*)’:
/home/xavier/dev/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76686:58: error: no matching function for call to ‘sipQgsPseudoColorShader::shade(double&, int*&, int*&, int*&, int*&)’
                 sipRaiseUnknownException();
                                                          ^
/home/xavier/dev/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76686:58: note: candidates are:
In file included from /home/xavier/dev/qgis-git/src/qgis/python/core/raster/qgsrastershaderfunction.sip:6:0:
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note: bool QgsPseudoColorShader::shade(double, int*, int*, int*)
     bool shade( double, int*, int*, int* );
          ^
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note:   candidate expects 4 arguments, 5 provided
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note: bool QgsPseudoColorShader::shade(double, double, double, int*, int*, int*)
     bool shade( double, double, double, int*, int*, int* );
          ^
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note:   candidate expects 6 arguments, 5 provided
/home/xavier/dev/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp: In member function ‘virtual bool sipQgsPseudoColorShader::shade(double, double, double, double, int*, int*, int*, int*)’:
/home/xavier/dev/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76701:67: error: no matching function for call to ‘sipQgsPseudoColorShader::shade(double&, double&, double&, double&, int*&, int*&, int*&, int*&)’
         int a5;
                                                                   ^
/home/xavier/dev/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76701:67: note: candidates are:
In file included from /home/xavier/dev/qgis-git/src/qgis/python/core/raster/qgsrastershaderfunction.sip:6:0:
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note: bool QgsPseudoColorShader::shade(double, int*, int*, int*)
     bool shade( double, int*, int*, int* );
          ^
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note:   candidate expects 4 arguments, 8 provided
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note: bool QgsPseudoColorShader::shade(double, double, double, int*, int*, int*)
     bool shade( double, double, double, int*, int*, int* );
          ^
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note:   candidate expects 6 arguments, 8 provided
make[2]: *** [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart1.cpp.o] Error 1
make[1]: *** [python/CMakeFiles/python_module_qgis_core.dir/all] Error 2
make: *** [all] Error 2

Compilation went fine for sip 4.14.x

Associated revisions

Revision 641359d3
Added by Christian Urich almost 11 years ago

fix #8507

made void connectNotify( const char * signal ) protected instead of private
made bool eventFilter( QObject *obj, QEvent *event ) protected instead of private
made void showEvent( QShowEvent * ) and void hideEvent( QHideEvent * ) instead of private

Revision 349a4c97
Added by Christian Urich almost 11 years ago

fix #8507

made void connectNotify( const char * signal ) protected instead of private
made bool eventFilter( QObject *obj, QEvent *event ) protected instead of private
made void showEvent( QShowEvent * ) and void hideEvent( QHideEvent * ) instead of private

History

#1 Updated by Xavier Fung almost 11 years ago

I pulled the latest GIT but still got error.

[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o       
In file included from /home/xavier/dev/qgis-git/src/qgis/python/core/qgsmaplayerregistry.sip:10:0:
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/qgsmaplayerregistry.h: In member function ‘virtual void sipQgsMapLayerRegistry::connectNotify(const char*)’:
/home/xavier/dev/qgis-git/src/qgis/python/../src/core/qgsmaplayerregistry.h:252:10: error: ‘virtual void QgsMapLayerRegistry::connectNotify(const char*)’ is private
     void connectNotify( const char * signal );
          ^
/home/xavier/dev/qgis-git/src/qgis-build/python/core/sipcorepart3.cpp:21560:46: error: within this context
         return;
                                              ^
make[2]: *** [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o] Error 1
make[1]: *** [python/CMakeFiles/python_module_qgis_core.dir/all] Error 2
make: *** [all] Error 2

#2 Updated by Samuel Fernando Mesa Giraldo almost 11 years ago

Whith update pacman I get the next error:

Scanning dependencies of target python_module_qgis_core
[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart0.cpp.o
[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart1.cpp.o
[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart2.cpp.o
[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o
In file included from /home/samtux/Manjaro/src/AUR/qgis-git/src/qgis/python/core/qgsmaplayerregistry.sip:10:0:
/home/samtux/Manjaro/src/AUR/qgis-git/src/qgis/python/../src/core/qgsmaplayerregistry.h: En la función miembro ‘virtual void sipQgsMapLayerRegistry::connectNotify(const char*)’:
/home/samtux/Manjaro/src/AUR/qgis-git/src/qgis/python/../src/core/qgsmaplayerregistry.h:252:10: error: ‘virtual void QgsMapLayerRegistry::connectNotify(const char*)’ es privado
void connectNotify( const char * signal );
^
/home/samtux/Manjaro/src/AUR/qgis-git/src/qgis-build/python/core/sipcorepart3.cpp:21560:46: error: desde este contexto
return;
^
make[2]: *** [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o] Error 1
make[1]: *** [python/CMakeFiles/python_module_qgis_core.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Se produjo un error en build().
Cancelando... 

#3 Updated by Jan Michalek almost 11 years ago

Have the same problem on arch linux. There is an problem with new SIP API. I had try some older sip versions, but this older versions arent cowork with qscintilla. I wasn't able to build qgis package.
I have qscintilla 2.7.2-3 and SIP 4-15.1

Scanning dependencies of target python_module_qgis_core
[ 87%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart0.cpp.o
[ 87%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart1.cpp.o
/home/jelen/Downloads/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp: In member function ‘virtual bool sipQgsPseudoColorShader::shade(double, int*, int*, int*, int*)’:
/home/jelen/Downloads/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76446:58: error: no matching function for call to ‘sipQgsPseudoColorShader::shade(double&, int*&, int*&, int*&, int*&)’
'
' ^
/home/jelen/Downloads/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76446:58: note: candidates are:
In file included from /home/jelen/Downloads/qgis-git/src/qgis/python/core/raster/qgsrastershaderfunction.sip:6:0:
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note: bool QgsPseudoColorShader::shade(double, int*, int*, int*)
bool shade( double, int*, int*, int* );
^
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note: candidate expects 4 arguments, 5 provided
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note: bool QgsPseudoColorShader::shade(double, double, double, int*, int*, int*)
bool shade( double, double, double, int*, int*, int* );
^
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note: candidate expects 6 arguments, 5 provided
/home/jelen/Downloads/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp: In member function ‘virtual bool sipQgsPseudoColorShader::shade(double, double, double, double, int*, int*, int*, int*)’:
/home/jelen/Downloads/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76461:67: error: no matching function for call to ‘sipQgsPseudoColorShader::shade(double&, double&, double&, double&, int*&, int*&, int*&, int*&)’
int a4;
^
/home/jelen/Downloads/qgis-git/src/qgis-build/python/core/sipcorepart1.cpp:76461:67: note: candidates are:
In file included from /home/jelen/Downloads/qgis-git/src/qgis/python/core/raster/qgsrastershaderfunction.sip:6:0:
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note: bool QgsPseudoColorShader::shade(double, int*, int*, int*)
bool shade( double, int*, int*, int* );
^
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:36:10: note: candidate expects 4 arguments, 8 provided
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note: bool QgsPseudoColorShader::shade(double, double, double, int*, int*, int*)
bool shade( double, double, double, int*, int*, int* );
^
/home/jelen/Downloads/qgis-git/src/qgis/python/../src/core/raster/qgspseudocolorshader.h:39:10: note: candidate expects 6 arguments, 8 provided
make[2]: * [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart1.cpp.o] Error 1
make[1]:
[python/CMakeFiles/python_module_qgis_core.dir/all] Error 2
make: *
* [all] Error 2
==> CHYBA: Došlo k chybě v build().
Rušení...

#4 Updated by Jan Michalek almost 11 years ago

  • Assignee set to Xavier Fung

With this versions of packages makepkg works regulary
python-sip 4.14.7-1
python2-sip 4.14.7-1
sip 4.14.7-1
python-qscintilla 2.7.1-3
python-qscintilla-common 2.7.1-3
python2-qscintilla 2.7.1-3
pyqt4-common 4.10.2-1
python-pyqt4 4.10.2-1
python2-pyqt4 4.10.2-1

#5 Updated by Christian Urich almost 11 years ago

Run into the same issue (OSX 10.8 and sip 4.15.1)

/Users/christianurich/Documents/Quantum-GIS/python/../src/core/qgsmaplayerregistry.h: In member function 'virtual void sipQgsMapLayerRegistry::connectNotify(const char*)':
/Users/christianurich/Documents/Quantum-GIS/python/../src/core/qgsmaplayerregistry.h:252: error: 'virtual void QgsMapLayerRegistry::connectNotify(const char*)' is private
/Users/christianurich/Documents/Quantum-GIS/build/release/python/core/sipcorepart3.cpp:21714: error: within this context
make[2]: *** [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

A quick fix was making some methods protected instead of private, see pull request

https://github.com/qgis/Quantum-GIS/pull/883

#6 Updated by Christian Urich almost 11 years ago

  • Status changed from Open to Closed

#7 Updated by Donovan Cameron over 10 years ago

Building QGIS 2 (release) gets almost to the end and then what looks like another sip related error:

[100%] Building CXX object python/CMakeFiles/python_module_qgis_gui.dir/gui/sipguipart3.cpp.o
/usr/share/sip/QtGui/qsyntaxhighlighter.sip: In function ‘PyObject* meth_QgsExpressionHighlighter_setCurrentBlockUserData(PyObject*, PyObject*, PyObject*)’:
/usr/share/sip/QtGui/qsyntaxhighlighter.sip:78:93: error: ‘qtgui_wrap_ancestors’ was not declared in this scope
             PyObject *py_td = qtgui_wrap_ancestors(td, sipType_QTextDocument);
                                                                                             ^
python/CMakeFiles/python_module_qgis_gui.dir/build.make:443: recipe for target 'python/CMakeFiles/python_module_qgis_gui.dir/gui/sipguipart3.cpp.o' failed
make[2]: *** [python/CMakeFiles/python_module_qgis_gui.dir/gui/sipguipart3.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:3064: recipe for target 'python/CMakeFiles/python_module_qgis_gui.dir/all' failed
make[1]: *** [python/CMakeFiles/python_module_qgis_gui.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2

Is there another patch for 2.0.1 that can be used for this? I've already applied the one in this ticket and the build made it a lot farther.

Also available in: Atom PDF