Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with the installation of the Qwt (Qt6 installed from source)
Forum Updated to NodeBB v4.3 + New Features

Problem with the installation of the Qwt (Qt6 installed from source)

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 4 Posters 2.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LRDPRDX
    wrote on last edited by
    #1

    Hi, Qt'ers

    I have Qt6 (6.5) built from source and I am trying to install the Qwt library according to this guide: https://qwt.sourceforge.io/qwtinstall.html

    1. /home/lparadox/Tools/qt/qt6-install/bin/qmake qwt.pro
    2. make -j8

    and I'm getting the error:

    cd src/ && ( test -e Makefile || /home/lparadox/Tools/qt/qt6-install/bin/qmake -o Makefile /home/lparadox/Tools/qt/qwt-6.2.0/src/src.pro ) && make -f Makefile
    make[1]: Entering directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
    moc qwt_dyngrid_layout.h
    compiling qwt_dyngrid_layout.cpp
    compiling qwt_magnifier.cpp
    compiling qwt_panner.cpp
    compiling qwt_picker.cpp
    compiling qwt_symbol.cpp
    qwt_symbol.cpp:20:10: fatal error: qsvgrenderer.h: No such file or directory
       20 | #include <qsvgrenderer.h>
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [Makefile:1453: obj/qwt_symbol.o] Error 1
    make[1]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
    make: *** [Makefile:53: sub-src-make_first-ordered] Error 2
    

    I see the qsvgrenderer.h is present. Is this problem about the Qt version ?

    JonBJ 1 Reply Last reply
    0
    • L LRDPRDX

      Hi, Qt'ers

      I have Qt6 (6.5) built from source and I am trying to install the Qwt library according to this guide: https://qwt.sourceforge.io/qwtinstall.html

      1. /home/lparadox/Tools/qt/qt6-install/bin/qmake qwt.pro
      2. make -j8

      and I'm getting the error:

      cd src/ && ( test -e Makefile || /home/lparadox/Tools/qt/qt6-install/bin/qmake -o Makefile /home/lparadox/Tools/qt/qwt-6.2.0/src/src.pro ) && make -f Makefile
      make[1]: Entering directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
      moc qwt_dyngrid_layout.h
      compiling qwt_dyngrid_layout.cpp
      compiling qwt_magnifier.cpp
      compiling qwt_panner.cpp
      compiling qwt_picker.cpp
      compiling qwt_symbol.cpp
      qwt_symbol.cpp:20:10: fatal error: qsvgrenderer.h: No such file or directory
         20 | #include <qsvgrenderer.h>
            |          ^~~~~~~~~~~~~~~~
      compilation terminated.
      make[1]: *** [Makefile:1453: obj/qwt_symbol.o] Error 1
      make[1]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
      make: *** [Makefile:53: sub-src-make_first-ordered] Error 2
      

      I see the qsvgrenderer.h is present. Is this problem about the Qt version ?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @LRDPRDX
      Where exactly is that file present? And is qwt_symbol.cpp in /home/lparadox/Tools/qt/qwt-6.2.0/src directory?

      L 2 Replies Last reply
      0
      • JonBJ JonB

        @LRDPRDX
        Where exactly is that file present? And is qwt_symbol.cpp in /home/lparadox/Tools/qt/qwt-6.2.0/src directory?

        L Offline
        L Offline
        LRDPRDX
        wrote on last edited by
        #3

        @JonB The Qt file is here:

        /home/lparadox/Tools/qt/qt6-install/include/QtSvg
        

        The qwt_symbol.cpp is present at the dir you pointed.

        1 Reply Last reply
        0
        • JonBJ JonB

          @LRDPRDX
          Where exactly is that file present? And is qwt_symbol.cpp in /home/lparadox/Tools/qt/qwt-6.2.0/src directory?

          L Offline
          L Offline
          LRDPRDX
          wrote on last edited by
          #4

          @JonB Should I modify the *.pri files somehow in order to the qwt build to find those includes ?

          SGaistS 1 Reply Last reply
          0
          • L LRDPRDX

            @JonB Should I modify the *.pri files somehow in order to the qwt build to find those includes ?

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @LRDPRDX Hi,

            No, if not already present you should add QT += svg to the .pro file of Qwt.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            L 1 Reply Last reply
            0
            • SGaistS SGaist

              @LRDPRDX Hi,

              No, if not already present you should add QT += svg to the .pro file of Qwt.

              L Offline
              L Offline
              LRDPRDX
              wrote on last edited by
              #6

              @SGaist Hi

              I added QT += svg in qwt.pro -- the same error BUT the message now is a bit different :

              cd src/ && ( test -e Makefile || /home/lparadox/Tools/qt/qt6-install/bin/qmake -o Makefile /home/lparadox/Tools/qt/qwt-6.2.0/src/src.pro ) && make -f Makefile
              make[1]: Entering directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
              /usr/lib/qt5/bin/qmake -o Makefile src.pro
              Project WARNING: QwtSvg is enabled in qwtconfig.pri, but Qt has not been built with svg support
              compiling qwt_symbol.cpp
              compiling qwt_text_label.cpp
              compiling qwt_spline_curve_fitter.cpp
              compiling qwt_weeding_curve_fitter.cpp
              moc qwt_abstract_legend.h
              moc qwt_legend.h
              compiling qwt_legend_data.cpp
              moc qwt_legend_label.h
              qwt_symbol.cpp:20:10: fatal error: qsvgrenderer.h: No such file or directory
                 20 | #include <qsvgrenderer.h>
                    |          ^~~~~~~~~~~~~~~~
              compilation terminated.
              make[1]: *** [Makefile:1447: obj/qwt_symbol.o] Error 1
              make[1]: *** Waiting for unfinished jobs....
              make[1]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
              make: *** [Makefile:53: sub-src-make_first-ordered] Error 2
              

              I tried to disable QwtSvg in qwtconfig by commenting this line ( I will try to compile Qt with svg enabled later) :

              QWT_CONFIG     += QwtSvg
              

              Then make . The library seems to compile but the examples give errors :

              ...
              linking ../bin/animation
              compiling Plot.cpp
              moc CpuPlot.h
              /usr/bin/ld: obj/Plot.o: in function `Plot::updateCurves()':
              Plot.cpp:(.text+0xf9): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
              /usr/bin/ld: obj/Plot.o: in function `Curve::updateSamples(double)':
              Plot.cpp:(.text._ZN5Curve13updateSamplesEd[_ZN5Curve13updateSamplesEd]+0x4c): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
              collect2: error: ld returned 1 exit status
              make[2]: *** [Makefile:364: ../bin/animation] Error 1
              make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/animation'
              make[1]: *** [Makefile:72: sub-animation-make_first] Error 2
              make[1]: *** Waiting for unfinished jobs....
              compiling Plot.cpp
              linking ../bin/barchart
              linking ../bin/distrowatch
              /usr/bin/ld: obj/BarChart.o: in function `BarChart::populate()':
              BarChart.cpp:(.text+0x55e): undefined reference to `QwtPlotMultiBarChart::setSamples(QList<QList<double> > const&)'
              collect2: error: ld returned 1 exit status
              make[2]: *** [Makefile:364: ../bin/barchart] Error 1
              make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/barchart'
              make[1]: *** [Makefile:97: sub-barchart-make_first] Error 2
              linking ../bin/friedberg
              /usr/bin/ld: obj/BarChart.o: in function `BarChart::BarChart(QWidget*)':
              BarChart.cpp:(.text+0xfed): undefined reference to `QwtPlotBarChart::setSamples(QList<double> const&)'
              collect2: error: ld returned 1 exit status
              make[2]: *** [Makefile:364: ../bin/distrowatch] Error 1
              make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/distrowatch'
              make[1]: *** [Makefile:172: sub-distrowatch-make_first] Error 2
              compiling Editor.cpp
              /usr/bin/ld: obj/Plot.o: in function `Plot::insertCurve(QString const&, QList<QPointF> const&, QColor const&)':
              Plot.cpp:(.text+0x17b): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
              /usr/bin/ld: obj/Plot.o: in function `Plot::insertErrorBars(QString const&, QList<QwtIntervalSample> const&, QColor const&)':
              Plot.cpp:(.text+0x28e): undefined reference to `QwtPlotIntervalCurve::setSamples(QList<QwtIntervalSample> const&)'
              collect2: error: ld returned 1 exit status
              make[2]: *** [Makefile:368: ../bin/friedberg] Error 1
              make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/friedberg'
              make[1]: *** [Makefile:197: sub-friedberg-make_first] Error 2
              linking ../bin/legends
              /usr/bin/ld: obj/Plot.o: in function `Plot::insertCurve()':
              Plot.cpp:(.text+0x7e4): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
              collect2: error: ld returned 1 exit status
              make[2]: *** [Makefile:373: ../bin/legends] Error 1
              make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/legends'
              make[1]: *** [Makefile:247: sub-legends-make_first] Error 2
              linking ../bin/cpuplot
              make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/cpuplot'
              linking ../bin/itemeditor
              make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/itemeditor'
              make[1]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples'
              make: *** [Makefile:225: sub-examples-make_first-ordered] Error 2
              
              JonBJ 1 Reply Last reply
              0
              • L LRDPRDX

                @SGaist Hi

                I added QT += svg in qwt.pro -- the same error BUT the message now is a bit different :

                cd src/ && ( test -e Makefile || /home/lparadox/Tools/qt/qt6-install/bin/qmake -o Makefile /home/lparadox/Tools/qt/qwt-6.2.0/src/src.pro ) && make -f Makefile
                make[1]: Entering directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
                /usr/lib/qt5/bin/qmake -o Makefile src.pro
                Project WARNING: QwtSvg is enabled in qwtconfig.pri, but Qt has not been built with svg support
                compiling qwt_symbol.cpp
                compiling qwt_text_label.cpp
                compiling qwt_spline_curve_fitter.cpp
                compiling qwt_weeding_curve_fitter.cpp
                moc qwt_abstract_legend.h
                moc qwt_legend.h
                compiling qwt_legend_data.cpp
                moc qwt_legend_label.h
                qwt_symbol.cpp:20:10: fatal error: qsvgrenderer.h: No such file or directory
                   20 | #include <qsvgrenderer.h>
                      |          ^~~~~~~~~~~~~~~~
                compilation terminated.
                make[1]: *** [Makefile:1447: obj/qwt_symbol.o] Error 1
                make[1]: *** Waiting for unfinished jobs....
                make[1]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/src'
                make: *** [Makefile:53: sub-src-make_first-ordered] Error 2
                

                I tried to disable QwtSvg in qwtconfig by commenting this line ( I will try to compile Qt with svg enabled later) :

                QWT_CONFIG     += QwtSvg
                

                Then make . The library seems to compile but the examples give errors :

                ...
                linking ../bin/animation
                compiling Plot.cpp
                moc CpuPlot.h
                /usr/bin/ld: obj/Plot.o: in function `Plot::updateCurves()':
                Plot.cpp:(.text+0xf9): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
                /usr/bin/ld: obj/Plot.o: in function `Curve::updateSamples(double)':
                Plot.cpp:(.text._ZN5Curve13updateSamplesEd[_ZN5Curve13updateSamplesEd]+0x4c): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
                collect2: error: ld returned 1 exit status
                make[2]: *** [Makefile:364: ../bin/animation] Error 1
                make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/animation'
                make[1]: *** [Makefile:72: sub-animation-make_first] Error 2
                make[1]: *** Waiting for unfinished jobs....
                compiling Plot.cpp
                linking ../bin/barchart
                linking ../bin/distrowatch
                /usr/bin/ld: obj/BarChart.o: in function `BarChart::populate()':
                BarChart.cpp:(.text+0x55e): undefined reference to `QwtPlotMultiBarChart::setSamples(QList<QList<double> > const&)'
                collect2: error: ld returned 1 exit status
                make[2]: *** [Makefile:364: ../bin/barchart] Error 1
                make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/barchart'
                make[1]: *** [Makefile:97: sub-barchart-make_first] Error 2
                linking ../bin/friedberg
                /usr/bin/ld: obj/BarChart.o: in function `BarChart::BarChart(QWidget*)':
                BarChart.cpp:(.text+0xfed): undefined reference to `QwtPlotBarChart::setSamples(QList<double> const&)'
                collect2: error: ld returned 1 exit status
                make[2]: *** [Makefile:364: ../bin/distrowatch] Error 1
                make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/distrowatch'
                make[1]: *** [Makefile:172: sub-distrowatch-make_first] Error 2
                compiling Editor.cpp
                /usr/bin/ld: obj/Plot.o: in function `Plot::insertCurve(QString const&, QList<QPointF> const&, QColor const&)':
                Plot.cpp:(.text+0x17b): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
                /usr/bin/ld: obj/Plot.o: in function `Plot::insertErrorBars(QString const&, QList<QwtIntervalSample> const&, QColor const&)':
                Plot.cpp:(.text+0x28e): undefined reference to `QwtPlotIntervalCurve::setSamples(QList<QwtIntervalSample> const&)'
                collect2: error: ld returned 1 exit status
                make[2]: *** [Makefile:368: ../bin/friedberg] Error 1
                make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/friedberg'
                make[1]: *** [Makefile:197: sub-friedberg-make_first] Error 2
                linking ../bin/legends
                /usr/bin/ld: obj/Plot.o: in function `Plot::insertCurve()':
                Plot.cpp:(.text+0x7e4): undefined reference to `QwtPlotCurve::setSamples(QList<QPointF> const&)'
                collect2: error: ld returned 1 exit status
                make[2]: *** [Makefile:373: ../bin/legends] Error 1
                make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/legends'
                make[1]: *** [Makefile:247: sub-legends-make_first] Error 2
                linking ../bin/cpuplot
                make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/cpuplot'
                linking ../bin/itemeditor
                make[2]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples/itemeditor'
                make[1]: Leaving directory '/home/lparadox/Tools/qt/qwt-6.2.0/examples'
                make: *** [Makefile:225: sub-examples-make_first-ordered] Error 2
                
                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @LRDPRDX
                I do not understand what you are showing now. In the first paste there is an error during compilation on #include <qsvgrenderer.h>, in the second block it seems to have got past compilation and has undefined references during linking.

                For the #include <qsvgrenderer.h> error, because it is inside < ... > the compiler will only seek this file in a directory passed on the command line via -I/home/lparadox/Tools/qt/qt6-install/include/QtSvg, it will not look in the current directory. That may be relevant to your situation.

                L 1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SimonSchroeder
                  wrote on last edited by
                  #8

                  You should try a clean build (delete the build directory by hand and start over). Maybe the examples will compile then.

                  I am not sure how current the documentation is (https://qwt.sourceforge.io/index.html), but it states:

                  Qwt 6.2 might be usable in all environments where you find Qt. It is compatible with Qt 4.8 and all Qt5 versions.

                  and

                  Active development will happen in the develop branch supporting Qt >= 5.6 and relying on at least C++11. However all versions >= Qt 4.8 will actively be supported in the 6.x branches.

                  I am not sure if Qt 6 is supported by Qwt (but it might still work). Has anyone better information about this?

                  JonBJ 1 Reply Last reply
                  1
                  • S SimonSchroeder

                    You should try a clean build (delete the build directory by hand and start over). Maybe the examples will compile then.

                    I am not sure how current the documentation is (https://qwt.sourceforge.io/index.html), but it states:

                    Qwt 6.2 might be usable in all environments where you find Qt. It is compatible with Qt 4.8 and all Qt5 versions.

                    and

                    Active development will happen in the develop branch supporting Qt >= 5.6 and relying on at least C++11. However all versions >= Qt 4.8 will actively be supported in the 6.x branches.

                    I am not sure if Qt 6 is supported by Qwt (but it might still work). Has anyone better information about this?

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #9

                    @SimonSchroeder said in Problem with the installation of the Qwt (Qt6 installed from source):

                    I am not sure if Qt 6 is supported by Qwt (but it might still work). Has anyone better information about this?

                    Don't know. Googling doesn't show much, a couple of references like

                    • https://packages.fedoraproject.org/pkgs/qwt/qwt-qt6-devel/ --- so someone got it working under Fedora?
                    • https://sourceforge.net/p/qwt/feature-requests/100/ --- managed it in 2022 with

                    Ok thats weird. I've just successfully compiled and linked Qwt with Qt6 by using a plain old "add_library" command instead of the "qt_add_library" version... Why this suddenly worked? I have no idea. Signals got generated in both versions...

                    ?

                    Oh, see also https://forum.qt.io/topic/152458/qwt-widgets-not-showing-qt-designer

                    my qt version is 6.3.1 and qwt verison 6.1.6

                    That's Windows, but should indicate that has been made to work at least?

                    1 Reply Last reply
                    0
                    • JonBJ JonB

                      @LRDPRDX
                      I do not understand what you are showing now. In the first paste there is an error during compilation on #include <qsvgrenderer.h>, in the second block it seems to have got past compilation and has undefined references during linking.

                      For the #include <qsvgrenderer.h> error, because it is inside < ... > the compiler will only seek this file in a directory passed on the command line via -I/home/lparadox/Tools/qt/qt6-install/include/QtSvg, it will not look in the current directory. That may be relevant to your situation.

                      L Offline
                      L Offline
                      LRDPRDX
                      wrote on last edited by
                      #10

                      @JonB Ok. Let me explain. First I am saying that adding QT += svg gives the same error and showing the output with that error. But as I said the error message was a bit different. Because of the new message I removed the QWT_CONFIG += QwtSvg line from the qwtconfig.pri and that error disappeared. The compilation passed that erroneous point but the examples failed to link.

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        LRDPRDX
                        wrote on last edited by LRDPRDX
                        #11

                        Thank you guys for your help.

                        I made it work. Actually I should have execute qmake6 not qmake. At least this worked.

                        So.

                        /home/lparadox/Tools/qt/qt6-install/bin/qmake6 qwt.pro
                        make -j8
                        

                        After this I was able to make my project using Qwt.

                        1 Reply Last reply
                        1
                        • SGaistS SGaist has marked this topic as solved on

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved