Closed ekigwana closed 6 years ago
Hi
Did you patch the qwt header files or copy the qwt_series_data.h qwt_series_store.h to the qwt headers? I will make it more clear in the documentation.
You only need the patched header files to compile the PyQt-Qwt, not Qwt itself.
Regards Gudjon
So even better I did the following:
diff --git a/configure.py b/configure.py
index d2ba86d..a7972b8 100755
--- a/configure.py
+++ b/configure.py
@@ -1558,6 +1558,8 @@ INSTALLS += sip
if includepath:
pro.write('INCLUDEPATH += %s\n' % includepath)
+ pro.write('INCLUDEPATH += %s\n' % "../header")
+
# Make sure the SIP include directory is searched before the Python include
# directory if they are different.
pro.write('INCLUDEPATH += %s\n' % quote(target_config.sip_inc_dir))
Great, thanks. This makes compiling easier.
I hope sometime I can get rid of the patch but until then I will use this addition.
Can I close the case now?
/Gudjon
So I got it build but I have a run time error
Traceback (most recent call last):
File "sysinfo.py", line 5, in <module>
from PyQt5 import Qwt
ImportError: /usr/lib64/python2.7/site-packages/PyQt5/Qwt.so: undefined symbol: _ZNK22QwtAbstractSeriesStore8dataSizeEv
I ran nm -C -u /usr/lib64/python2.7/site-packages/PyQt5/Qwt.so
and got
...
U QwtAbstractSeriesStore::setRectOfInterest(QRectF const&)
...
U QwtAbstractSeriesStore::dataRect() const
U QwtAbstractSeriesStore::dataSize() const
...
ldd shows libqwt6-qt5.so.6 => /usr/lib64/libqwt6-qt5.so.6 (0x00007fa591e67000)
Not sure what to look at next - I'll try recompiling qwt without stripping as look at it as well
What Linux version are you using? I tried on my Debian unstable $ for name in *.py; do python $name; done and all the examples work.
Did you clean before adding your configure.py patch?
My nm returns: nm /usr/lib/python2.7/dist-packages/PyQt5/Qwt.so |grep QwtAbstractSeriesStore8dataSize 0000000000074bf0 t _ZNK22QwtAbstractSeriesStore8dataSizeEv 00000000000b5660 t _ZNK25sipQwtAbstractSeriesStore8dataSizeEv
Hope this helps
I use Gentoo I'll try from scratch ad see if I can get a better result. I think you can close this issue now thanks for all your help.
Note my nm returns:
nm /usr/lib64/python2.7/site-packages/PyQt5/Qwt.so |grep QwtAbstractSeriesStore8dataSize
U _ZNK22QwtAbstractSeriesStore8dataSizeEv
000000000008cbd0 t _ZNK25sipQwtAbstractSeriesStore8dataSizeEv
gcc version 7.3.0 (Gentoo 7.3.0-r1 p1.1) GNU ld (Gentoo 2.30 p1) 2.30.0
The patch above is slick and might work better if a few other things are taken care of.
The compile command is:
g++ -c -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQWT_PYTHON_WRAPPER -DQWT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt6 -I../header -isystem /usr/include/python2.7 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o sipQwtQwtAbstractLegend.o sipQwtQwtAbstractLegend.cpp
And as you can see -isystem /usr/include/qwt6 comes before -I../header reverse those and the build should work without any issues.
I will keep my original way for a while but I will check your way better. I have updated the README file explaining better how to overwrite the original headers.
The -qt4/5 extension to the Qwt library is Debian specific. I added this to be able to install both Qt4 and Qt5 version of the Qwt library at the same time. This is unfortunately not a default behavior of Qwt.
Please let me know if everything works for you now.
I manually made links to handle the -qt5 so maybe you could choose at installation to creat the expected soft link and still support multiple slots. I got it work thanks.
I tried building the project and ran into some build issues Configuration output:
Build output: