[Description] Python scripting no longer works with qtiplot which is a major regression and makes the package unusable for users that require that feature. This is due to python SIP being updated but the package was not tested against it.
[Test Case] Open qtiplot, choose the menu "Scripting"->"Choose Scripting Language" select python. You'll get an error about an incompatible SIP API.
[Regression] It FTBFS as of now, this fix will make it build. Python doesn't work now, so it can't break anymore. The code changes only affect python scripting.
The patch is in comment #9. This was fixed in trusty via sync with Debian.
Original report: During a rebuild of all packages in sid, your package failed to build on
amd64.
Relevant part (hopefully):
> g++ -c -m64 -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_REENTRANT -Wall -W -DSCRIPTING_CONSOLE -DSVN_REVISION="\"\"" -DQT_PLUGIN -DTRANSLATIONS_PATH=\"/usr/share/qtiplot/translations\" -DMANUAL_PATH=\"/usr/share/doc/qtiplot/manual\" -DSCRIPTING_MUPARSER -DSCRIPTING_PYTHON -DPYTHON_CONFIG_PATH=\"/usr/share/qtiplot\" -DGL2PS_HAVE_LIBPNG -DTEX_OUTPUT -DHAVE_ALGLIB -DHAVE_TAMUANOVA -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtAssistantClient -I/usr/include/qt4/QtAssistant -I/usr/include/muParser -I../3rdparty/qwt/src -I../3rdparty/qwtplot3d/include -Iicons -Isrc/analysis -Isrc/analysis/dialogs -Isrc/core -Isrc/excel -Isrc/lib/include -Isrc/lib/3rdparty/qtcolorpicker/src -Isrc/plot2D -Isrc/plot2D/dialogs -Isrc/plot3D -Isrc/matrix -Isrc/table -Isrc/scripting -I/usr/include/python2.7 -I/usr/include/tamu_anova -I/usr/include -I/usr/X11R6/include -I/«PKGBUILDDIR»/tmp/qtiplot -o ../tmp/qtiplot/sipqtiImageWidget.o ../tmp/qtiplot/sipqtiImageWidget.cpp
> In file included from src/scripting/qti.sip:1119:0:
> icons/../src/plot2D/ImageWidget.h: In member function 'virtual void sipImageWidget::paintEvent(QPaintEvent*)':
> icons/../src/plot2D/ImageWidget.h:73:7: error: 'virtual void ImageWidget::paintEvent(QPaintEvent*)' is private
> void paintEvent(QPaintEvent *e);
> ^
> ../tmp/qtiplot/sipqtiImageWidget.cpp:907:35: error: within this context
> ImageWidget::paintEvent(a0);
> ^
> make[3]: *** [../tmp/qtiplot/sipqtiImageWidget.o] Error 1
This particular bug is easily fixable, however it then fails further down with:
x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -D_REENTRANT -Wall -W -DSCRIPTING_CONSOLE -DQTIPLOT_PRO -DSVN_REVISION="\"\"" -DQT_PLUGIN -DTRANSLATIONS_PATH=\"/usr/share/qtiplot/translations\" -DMANUAL_PATH=\"/usr/share/doc/qtiplot/html\" -DSCRIPTING_MUPARSER -DSCRIPTING_PYTHON -DPYTHON_CONFIG_PATH=\"/usr\" -DGL2PS_HAVE_LIBPNG -DTEX_OUTPUT -DHAVE_ALGLIB -DHAVE_TAMUANOVA -DNO_LOG_FILE -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtAssistantClient -I/usr/include/qt4/QtAssistant -I../3rdparty/qwt/src -I../3rdparty/qwtplot3d/include -Iicons -Isrc/analysis -Isrc/analysis/dialogs -Isrc/core -Isrc/excel -Isrc/lib/inc
lude -Isrc/lib/3rdparty/qtcolorpicker/src -Isrc/plot2D -Isrc/plot2D/dialogs -Isrc/plot3D -Isrc/matrix -Isrc/table -Isrc/scripting -I/usr/include/python2.7 -I/usr/include/tamu_anova -Isrc/plugins/exportEMF -Isrc/plugins/exportEMF/3rdparty/EmfEngine/src -Isrc/plugins/OriginPlugin -Isrc/plugins/OriginPlugin/liborigin1 -Isrc/plugins/OriginPlugin/liborigin2 -Isrc/plugins/OriginPlugin/tree.phi-sci.com -I../3rdparty/boost -I/usr/X11R6/include -I/var/tmp/portage/sci-visualization/qtiplot-0.9.8.9-r2/work/qtiplot-0.9.8.9/tmp/qtiplot -o ../tmp/qtiplot/sipqtiFFT.o ../tmp/qtiplot/sipqtiFFT.cpp
../tmp/qtiplot/sipqtiFFT.cpp: In member function ‘virtual bool sipFFT::setDataFromTable(Table*, const QString&, const QString&, int, int, bool)’:
../tmp/qtiplot/sipqtiFFT.cpp:563:55: error: no matching function for call to ‘sipFFT::setDataFromTable(Table*&, const QString&, const QString&, int&, int&, bool&)’
return FFT::setDataFromTable(a0,a1,a2,a3,a4,a5);
^
../tmp/qtiplot/sipqtiFFT.cpp:563:55: note: candidate is:
In file included from src/scripting/qti.sip:3219:0:
icons/../src/analysis/FFT.h:63:10: note: bool FFT::setDataFromTable(Table*, const QString&, const QString&, int, int)
bool setDataFromTable(Table *t, const QString& realColName, const QString& imagColName = QString(), int from = 0, int to = -1);
^
icons/../src/analysis/FFT.h:63:10: note: candidate expects 5 arguments, 6 provided
src/scripting/qti.sip: At global scope:
src/scripting/qti.sip:119:12: warning: ‘int setCellDataHelper(Table*, int, int, PyObject*)’ defined but not used [-Wunused-function]
static int setCellDataHelper(Table* table, int row, int col, PyObject* item) {
^
src/scripting/qti.sip:233:12: warning: ‘int cellDataHelper(Table*, int, int, PyObject**)’ defined but not used [-Wunused-function]
static int cellDataHelper(Table* table, int row, int col, PyObject** item) {
^
make[1]: *** [../tmp/qtiplot/sipqtiFFT.o] Error 1
Forwarded to http://developer.berlios.de/bugs/?func=detailbug&bug_id=19204&group_id=6626
Python scriting isn't working in Saucy (Ubuntu 13.10), obtaning "Failed to export QtiPlot API: Accessing QtiPlot functions or objects from Python code won't work. Probably your version of Qt/SIP/PyQt differs from the one QtiPlot was compiled against."
When trying to initialize the scripting.
Qtiplot installed version : 0.9.8.9-6.
This bug has been previously reported for Raring (Ubuntu 13.04), see bug #1129237, and get fixed. But appears again in Saucy...
It seems to be a compatibility problem.
Thanks for the report.
This is a little annoying that this happens every release... Whomever does the SIP upload really should ask for rebuilds against dependencies.
In a few hours, could you try:
sudo add-apt-repository ppa:showard314/ppa
sudo apt-get update
sudo apt-get install qtiplot
It's the exact same package, just rebuilt against the new SIP libraries. It will take ~1-2 hours before it's published an available for download.
Let us know if that works.