Results 1 to 7 of 7

Thread: Github actiosn migration - QWT not found error

  1. #1
    Join Date
    Oct 2020
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question Github actiosn migration - QWT not found error

    I'm in process of renovating an existing QT application & having received the source code I've added it to a github actions routine for cross platform builds.
    However I am getting the a QWT not found error for my Linux & OSX build & can't figure out why (probably due to my lack of QT experience), any advice would be appreciated.


    build.yml

    https://github.com/MaximumTrainer/Ma...lows/build.yml

    pro build file
    https://github.com/MaximumTrainer/Ma.../PowerVelo.pro

    Linux error -
    src/main/util.h:7:10: fatal error: qwt_plot.h: No such file or directory
    #include <qwt_plot.h>
    ^~~~~~~~~~~~
    compilation terminated.
    make: *** [build/release/.obj/userdao.o] Error 1
    Makefile:18472: recipe for target 'build/release/.obj/userdao.o' failed
    Error: Process completed with exit code 2.


    Mac error -

    src/main/util.h:7:10: fatal error: 'qwt_plot.h' file not found
    #include <qwt_plot.h>
    ^~~~~~~~~~~~
    1 error generated.
    make: *** [build/release/.obj/userdao.o] Error 1
    Error: Process completed with exit code 2.


    Github actions full output:

    https://github.com/MaximumTrainer/Ma...true#step:6:37

    Note the windows build fails for a different reason which I will fix after this issue is resolved.

    Thanks for your advice

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,714
    Thanks
    259
    Thanked 759 Times in 749 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Github actiosn migration - QWT not found error

    Qwt is not part of the standard Qt distribution. It is an open-source library. You will have to download and build it for your platforms. You will also have to check which version of Qwt your app uses - Qwt 5 or Qwt 6. They are not compatible.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Oct 2020
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Github actiosn migration - QWT not found error

    Thanks & I thought that was the case.
    In the build.yml I install QWT for OSX & Linux prior to triggering qmake & make, either via brew or apt-get, is this correct?

    see here - https://github.com/MaximumTrainer/Ma...lows/build.yml

    Linux


    Qt Code:
    1. - name: checkout
    2. uses: actions/checkout@v2
    3. - name: Linux Environment Setup
    4. run: |
    5. DEBIAN_FRONTEND=noninteractive apt update && apt install sudo software-properties-common --yes
    6. DEBIAN_FRONTEND=noninteractive sudo apt-get update --yes
    7. sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic
    8. sudo DEBIAN_FRONTEND=noninteractive apt install python3-pip --yes
    9. sudo DEBIAN_FRONTEND=noninteractive sudo apt-get install -qq qt5-default qt512base qt512tools libqwt-qt5-6 qt512serialport qt512svg qt512multimedia qt512connectivity qt512webengine qt512charts-no-lgpl qt512networkauth-no-lgpl qt512translations qtdeclarative5-dev-tools libqwt-qt5-dev
    10. - name: Install Qt
    11. uses: jurplel/install-qt-action@v2.8.0
    12. with:
    13. modules: 'qwt qtcharts qtwebengine'
    14.  
    15. - name: Create Makefile
    16. run: |
    17. qmake -set QMAKEFEATURES /resources/qwt/
    18. qmake PowerVelo.pro
    19. - name: Run MakeFile
    20. run: make
    To copy to clipboard, switch view to plain text mode 



    Mac


    Qt Code:
    1. name: QT Environment Setup
    2. run: brew install qt5 qwt
    3. - name: Install Qt
    4. uses: jurplel/install-qt-action@v2.8.0
    5. with:
    6. modules: 'qwt qtcharts qtwebengine'
    7. - name: Create Makefile
    8. run: |
    9. qmake -set QMAKEFEATURES /resources/qwt/
    10. qmake PowerVelo.pro
    11. - name: Run MakeFile
    12. run: make
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,677
    Thanks
    13
    Thanked 1,596 Times in 1,524 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Github actiosn migration - QWT not found error

    I can see you install Qwt 6 and its dev package into Ubuntu. This installs the qwt.prf file in a standard location (not /resources/qwt) that should be found by qmake without any modification of QMAKEFEATURES.

    I am not familiar with the Github environment, so I am not sure what effect jurplel/install-qt-action is supposed to have in addition to the Linux setup you have already done. It seem to me that jurplel/install-qt-action has no provision for qwt.

  5. #5
    Join Date
    Oct 2020
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Github actiosn migration - QWT not found error

    Yes I agree that jurplel/install-qt-action may be overriding the manual install of qt & qwt.
    Here is the build output when I remove jurplel/install-qt-action from build.yml -


    Linux
    Qt Code:
    1. Run qmake -set QMAKEFEATURES /resources/qwt/
    2. qmake -set QMAKEFEATURES /resources/qwt/
    3. qmake PowerVelo.pro
    4. shell: /bin/bash -e {0}
    5. Info: creating stash file /home/runner/work/MaximumTrainer/MaximumTrainer/.qmake.stash
    6. /home/runner/work/MaximumTrainer/MaximumTrainer/PowerVelo.pro:6: 'versionAtLeast' is not a recognized test function.
    7. Project ERROR: Use at least Qt version 5.12
    8. Error: Process completed with exit code 3.
    To copy to clipboard, switch view to plain text mode 
    looking into this it appears that QT 5.9.5 was installed, so I have just adjusted the pro file build for the moment

    Mac
    Qt Code:
    1. 0s
    2. Run qmake -set QMAKEFEATURES /resources/qwt/
    3. qmake -set QMAKEFEATURES /resources/qwt/
    4. qmake PowerVelo.pro
    5. shell: /bin/bash -e {0}
    6. /Users/runner/work/_temp/eb005e71-d79b-4b46-a79a-086122d1c270.sh: line 1: qmake: command not found
    7. Error: Process completed with exit code 127.
    To copy to clipboard, switch view to plain text mode 
    Reading this implies a path issue to me.


    In my latest build I have removed jurplel/install-qt-action as this is causing a conflict & here are the latest errors -

    Linux
    Qt Code:
    1. Run qmake -version
    2. QMake version 3.1
    3. Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
    4. Info: creating stash file /home/runner/work/MaximumTrainer/MaximumTrainer/.qmake.stash
    5. /home/runner/work/MaximumTrainer/MaximumTrainer/PowerVelo.pro:6: 'versionAtLeast' is not a recognized test function.
    6. Project ERROR: Use at least Qt version 5.9.0
    7. Error: Process completed with exit code 3.
    To copy to clipboard, switch view to plain text mode 


    Mac this is back to the qwt not found error, not sure if this is as brew install qwt6 by default
    Qt Code:
    1. In file included from src/_db/userdao.cpp:4:
    2. src/main/util.h:7:10: fatal error: 'qwt_plot.h' file not found
    3. #include <qwt_plot.h>
    4. ^~~~~~~~~~~~
    5. 1 error generated.
    6. make: *** [build/release/.obj/userdao.o] Error 1
    To copy to clipboard, switch view to plain text mode 

    full build can be found https://github.com/MaximumTrainer/MaximumTrainer/actions/runs/298838171

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,677
    Thanks
    13
    Thanked 1,596 Times in 1,524 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Github actiosn migration - QWT not found error

    The versionAtLeast() qmake function you are using does not exist before Qt 5.10, which explains the "not recognized test function" message out of Qt 5.9. Something like this should work under any version of Qt 5
    Qt Code:
    1. equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) {
    2. message("Cannot use Qt $${QT_VERSION}")
    3. error("Use Qt 5.9 or newer")
    4. }
    To copy to clipboard, switch view to plain text mode 

    I am focusing on the Linux environment (do not have a Mac)

    You explicitly install most of Qt from a PPA that installs it under /opt/qt512 (qt512base qt512tools qt512serialport qt512svg qt512multimedia qt512connectivity qt512webengine qt512charts-no-lgpl qt512networkauth-no-lgpl qt512translations)
    The PPA page advises:
    Source /opt/qt512/bin/qt512-env.sh to set the correct environment.
    I suspect if you arranged this before you called qmake you would have Qt 5.12

    The Qwt libraries you install are from the Ubuntu repository (libqwt-qt5-dev libqwt-qt5-6), and these install into locations for the generic system Qt version. They are probably responsible for pulling in enough of Qt5.9 to satisfy qwt (you see this in the log file). The feature file installed by this version (i.e. qwt.prf) will not be visible in the Qt 5.12 install

    As I see it, you have two options:
    1. Use the Ubuntu system Qt, Qt Charts, Qt Web Engine and Qwt and build using Qt 5.9
    2. Use the PPA Qt 5.12, which includes everything except Qwt, and work out how to build Qwt and install for that version of Qt in the GitHub environment.

  7. #7
    Join Date
    Oct 2020
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Github actiosn migration - QWT not found error

    Thanks for the advise, I have now downgraded to QT 5.9. Looking at the Linux build this was causing multiple problems as I was using ACT locally (to simulate github actions) which I have now resolved, resulting in a Linux code compiling & erroring in a consistent was as my local environment.
    I will now work through this & figure out the mac & windows issues.

    Thanks

Similar Threads

  1. QML Not Found Error
    By Mathan in forum Qt Tools
    Replies: 1
    Last Post: 25th July 2016, 15:57
  2. -llua not found error
    By MarkoSan in forum Qt Programming
    Replies: 1
    Last Post: 14th February 2011, 00:36
  3. MFC->Qt Migration link error
    By LynneV in forum Installation and Deployment
    Replies: 1
    Last Post: 25th December 2009, 23:13
  4. MFC to Qt Migration install error
    By marianj in forum Newbie
    Replies: 1
    Last Post: 15th October 2009, 12:42
  5. Too simple compile error to be found by me??!!!
    By MarkoSan in forum General Programming
    Replies: 6
    Last Post: 20th December 2007, 05:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.