hyOzd / serialplot

Small and simple software for plotting data from serial port in realtime.
https://hackaday.io/project/5334-serialplot-realtime-plotting-software
GNU General Public License v3.0
739 stars 182 forks source link

Serialplot build fails #16

Closed gbThreepwood closed 2 years ago

gbThreepwood commented 2 years ago

I have successfully used serialplot in the past, but today when I needed to use it for some measurements, I got the error serialplot: symbol lookup error: serialplot: undefined symbol: _ZN13QwtPlotZoomer7setAxisEii when I tried to start it

Figured I had to update the software, but I am also having trouble building it.

[ 29%] Building CXX object CMakeFiles/serialplot.dir/src/plot.cpp.o
/home/user/Downloads/AUR/serialplot-hg/src/serialplot/src/plot.cpp: In member function ‘void Plot::calcSymbolSize()’:
/home/user/Downloads/AUR/serialplot-hg/src/serialplot/src/plot.cpp:277:47: error: invalid use of incomplete type ‘class QwtScaleMap’
  277 |     auto paintDist = sw->scaleDraw()->scaleMap().pDist();
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/qwt/qwt_plot_seriesitem.h:14,
                 from /usr/include/qwt/qwt_plot_curve.h:14,
                 from /home/user/Downloads/AUR/serialplot-hg/src/serialplot/src/plot.cpp:24:
/usr/include/qwt/qwt_plot_item.h:17:7: note: forward declaration of ‘class QwtScaleMap’
   17 | class QwtScaleMap;
      |       ^~~~~~~~~~~
/home/user/Downloads/AUR/serialplot-hg/src/serialplot/src/plot.cpp:278:47: error: invalid use of incomplete type ‘class QwtScaleMap’
  278 |     auto scaleDist = sw->scaleDraw()->scaleMap().sDist();
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/qwt/qwt_plot_seriesitem.h:14,
                 from /usr/include/qwt/qwt_plot_curve.h:14,
                 from /home/user/Downloads/AUR/serialplot-hg/src/serialplot/src/plot.cpp:24:
/usr/include/qwt/qwt_plot_item.h:17:7: note: forward declaration of ‘class QwtScaleMap’
   17 | class QwtScaleMap;
      |       ^~~~~~~~~~~
make[2]: *** [CMakeFiles/serialplot.dir/build.make:208: CMakeFiles/serialplot.dir/src/plot.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/serialplot.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Not sure if this issue is isolated to my specific system configuration, or if it is something everyone will face if they update their system. I am running Manjaro with the latest updates, and tried building through AUR, as well as manually.

Some relevant packages and their version number: qwt 6.2.0-1 qt5-serialport 5.15.2-1 qt5-base 5.15.2+kde+r263-1

hyOzd commented 2 years ago

This is probably related to the Qwt 6.2. If you compile from the source and let the cmake download and build the Qwt (which is set as version 6.1 at the moment), it should work.

gbThreepwood commented 2 years ago

Yes, that worked. Thanks.