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.
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.
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:
- name: checkout uses: actions/checkout@v2 - name: Linux Environment Setup run: | DEBIAN_FRONTEND=noninteractive apt update && apt install sudo software-properties-common --yes DEBIAN_FRONTEND=noninteractive sudo apt-get update --yes sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic sudo DEBIAN_FRONTEND=noninteractive apt install python3-pip --yes 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 - name: Install Qt uses: jurplel/install-qt-action@v2.8.0 with: modules: 'qwt qtcharts qtwebengine' - name: Create Makefile run: | qmake -set QMAKEFEATURES /resources/qwt/ qmake PowerVelo.pro - name: Run MakeFile run: makeTo copy to clipboard, switch view to plain text mode
Mac
Qt Code:
name: QT Environment Setup run: brew install qt5 qwt - name: Install Qt uses: jurplel/install-qt-action@v2.8.0 with: modules: 'qwt qtcharts qtwebengine' - name: Create Makefile run: | qmake -set QMAKEFEATURES /resources/qwt/ qmake PowerVelo.pro - name: Run MakeFile run: makeTo copy to clipboard, switch view to plain text mode
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.
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
looking into this it appears that QT 5.9.5 was installed, so I have just adjusted the pro file build for the momentQt Code:
Run qmake -set QMAKEFEATURES /resources/qwt/ qmake -set QMAKEFEATURES /resources/qwt/ qmake PowerVelo.pro shell: /bin/bash -e {0} Info: creating stash file /home/runner/work/MaximumTrainer/MaximumTrainer/.qmake.stash /home/runner/work/MaximumTrainer/MaximumTrainer/PowerVelo.pro:6: 'versionAtLeast' is not a recognized test function. Project ERROR: Use at least Qt version 5.12 Error: Process completed with exit code 3.To copy to clipboard, switch view to plain text mode
Mac
Reading this implies a path issue to me.Qt Code:
0s Run qmake -set QMAKEFEATURES /resources/qwt/ qmake -set QMAKEFEATURES /resources/qwt/ qmake PowerVelo.pro shell: /bin/bash -e {0} /Users/runner/work/_temp/eb005e71-d79b-4b46-a79a-086122d1c270.sh: line 1: qmake: command not found Error: Process completed with exit code 127.To copy to clipboard, switch view to plain text mode
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:
Run qmake -version QMake version 3.1 Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu Info: creating stash file /home/runner/work/MaximumTrainer/MaximumTrainer/.qmake.stash /home/runner/work/MaximumTrainer/MaximumTrainer/PowerVelo.pro:6: 'versionAtLeast' is not a recognized test function. Project ERROR: Use at least Qt version 5.9.0 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:
In file included from src/_db/userdao.cpp:4: 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 1To copy to clipboard, switch view to plain text mode
full build can be found https://github.com/MaximumTrainer/MaximumTrainer/actions/runs/298838171
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:
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) { message("Cannot use Qt $${QT_VERSION}") error("Use Qt 5.9 or newer") }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:
I suspect if you arranged this before you called qmake you would have Qt 5.12Source /opt/qt512/bin/qt512-env.sh to set the correct environment.
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.
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
Bookmarks