Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 609280 - sci-visualization/qtiplot-0.9.8.9-r3 fails to compile against sip-4.19
Summary: sci-visualization/qtiplot-0.9.8.9-r3 fails to compile against sip-4.19
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 611784
  Show dependency tree
 
Reported: 2017-02-13 16:11 UTC by Fabio Rossi
Modified: 2017-03-05 12:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
qtiplot-0.9.8.9-sip-4.19.patch (qtiplot-0.9.8.9-sip-4.19.patch,1.51 KB, patch)
2017-02-13 16:14 UTC, Fabio Rossi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2017-02-13 16:11:13 UTC
x86_64-pc-linux-gnu-g++ -c -march=core2 -O2 -pipe -ggdb -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/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 -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/var/tmp/portage/sci-visualization/qtiplot-0.9.8.9-r3/work/qtiplot-0.9.8.9/tmp/qtiplot -o ../tmp/qtiplot/sipqticmodule.o ../tmp/qtiplot/sipqticmodule.cpp
src/scripting/qti.sip: In function ‘int setCellDataHelper(Table*, int, int, PyObject*)’:
src/scripting/qti.sip:151:35: error: ‘sipType_QDateTime’ was not declared in this scope
     if (sipCanConvertToType(item, sipType_QDateTime, 0)) {
                                   ^
src/scripting/qti.sip:167:35: error: ‘sipType_QTime’ was not declared in this scope
     if (sipCanConvertToType(item, sipType_QTime, 0)) {
                                   ^
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) {
            ^
Makefile:2473: recipe for target '../tmp/qtiplot/sipqticmodule.o' failed
make[1]: *** [../tmp/qtiplot/sipqticmodule.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/sci-visualization/qtiplot-0.9.8.9-r3/work/qtiplot-0.9.8.9/qtiplot'
Makefile:224: recipe for target 'sub-qtiplot-qtiplot-pro-make_default-ordered' failed
make: *** [sub-qtiplot-qtiplot-pro-make_default-ordered] Error 2
Comment 1 Fabio Rossi 2017-02-13 16:14:03 UTC
Created attachment 463652 [details, diff]
qtiplot-0.9.8.9-sip-4.19.patch

Here is the proposed patch which fixes the compilation. Moreover the patch removes the delete statement because it causes a crash with double free or corruption.
Comment 2 Helmut Jarausch 2017-02-15 10:10:34 UTC
Unfortunately, this patch doesn't suffice.

I still get

In file included from src/scripting/PythonScripting.cpp:61:0:
src/scripting/PythonScripting.cpp: In member function 'bool PythonScripting::setQObject(QObject*, const char*, PyObject*)':
/var/tmp/portage/sci-visualization/qtiplot-0.9.8.9-r4/work/qtiplot-0.9.8.9/tmp/qtiplot/sipAPIqti.h:2399:75: error: 'sipWrapperType {aka struct _sipWrapperType}' has no member named 'type'
 ne sipConvertFromInstance(p, wt, t)    sipConvertFromType((p), (wt)->type, (t))
                                                                      ^
src/scripting/PythonScripting.cpp:365:21: note: in expansion of macro 'sipConvertFromInstance'
  if (klass) pyobj = sipConvertFromInstance(val, klass, NULL);
                     ^~~~~~~~~~~~~~~~~~~~~~

Furthermore,
I had to add the following sed instructions to src_prepare

	sed -i -e's/setFlags(!Qt::ItemIsEditable)/setFlags((Qt::ItemFlags)!Qt::ItemIsEditable)/g' \
		qtiplot/src/core/ConfigDialog.cpp qtiplot/src/analysis/dialogs/FitDialog.cpp qtiplot/src/lib/src/ColorMapEditor.cpp

	sed -i -e's/QComboBox( *false *)/QComboBox/g' \
		qtiplot/src/plot2D/dialogs/PlotDialog.cpp qtiplot/src/plot2D/dialogs/LayerDialog.cpp \
		qtiplot/src/table/SetColValuesDialog.cpp qtiplot/src/table/TableDialog.cpp \
		qtiplot/src/matrix/MatrixValuesDialog.cpp

	sed -i -e's/PatternBox( *false *)/PatternBox/g' qtiplot/src/plot2D/dialogs/PlotDialog.cpp
Comment 3 Fabio Rossi 2017-02-15 11:29:04 UTC
(In reply to Helmut Jarausch from comment #2)
> Unfortunately, this patch doesn't suffice.
> 
> I still get
> 
> In file included from src/scripting/PythonScripting.cpp:61:0:
> src/scripting/PythonScripting.cpp: In member function 'bool
> PythonScripting::setQObject(QObject*, const char*, PyObject*)':
> /var/tmp/portage/sci-visualization/qtiplot-0.9.8.9-r4/work/qtiplot-0.9.8.9/
> tmp/qtiplot/sipAPIqti.h:2399:75: error: 'sipWrapperType {aka struct
> _sipWrapperType}' has no member named 'type'
>  ne sipConvertFromInstance(p, wt, t)    sipConvertFromType((p), (wt)->type,
> (t))
>                                                                       ^
> src/scripting/PythonScripting.cpp:365:21: note: in expansion of macro
> 'sipConvertFromInstance'
>   if (klass) pyobj = sipConvertFromInstance(val, klass, NULL);
>                      ^~~~~~~~~~~~~~~~~~~~~~
> 

Because your problem is not related to this bug, see also #606704. Furthermore you are reporting against qtiplot-0.9.8.9-r4, I'd suggest to open another bug report when you applied both patches (the one here and the other in #606704).
Comment 4 Andreas Sturmlechner gentoo-dev 2017-03-05 12:43:30 UTC
Thanks for your contribution, added the patch in commit 68af1bcdec50266f55ffd8cbd32e5522b820935a