Error process completed with exit code 127 github actions

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/MaximumTrainer/blob/master/.github/workflows/build.yml pro build file
  • Home
  • Forum
  • Qt
  • Newbie
  • Github actiosn migration — QWT not found error

  1. 8th October 2020, 15:00


    #1

    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. 8th October 2020, 23:46


    #2

    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. 9th October 2020, 11:19


    #3

    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

    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. - name: Create Makefile

    15. run: |

    16. qmake -set QMAKEFEATURES /resources/qwt/

    17. qmake PowerVelo.pro

    18. - name: Run MakeFile

    19. run: make

    To copy to clipboard, switch view to plain text mode 

    Mac

    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. 10th October 2020, 06:02


    #4

    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. 10th October 2020, 09:15


    #5

    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

    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

    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

    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

    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. 11th October 2020, 05:53


    #6

    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

    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. 13th October 2020, 15:41


    #7

    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. Replies: 1

    Last Post: 25th July 2016, 15:57

  2. Replies: 1

    Last Post: 14th February 2011, 00:36

  3. Replies: 1

    Last Post: 25th December 2009, 23:13

  4. Replies: 1

    Last Post: 15th October 2009, 12:42

  5. Replies: 6

    Last Post: 20th December 2007, 05:40

Tags for this Thread

Bookmarks

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
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules

Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.

I spent too much time trying to make MySQL service work on GitHub Actions and after hours of googling and configuration tests I’d like to share with you my findings.

If you come to this post from a Google search, you may have already read a ton of tutorials that have this code running MySQL inside your workflow:

services:
  mysql:
    image: mysql:5.7
    env:
      MYSQL_DATABASE: test_db
      MYSQL_USER: user
      MYSQL_PASSWORD: password
      MYSQL_ROOT_PASSWORD: rootpassword
    ports:
      - 33306:3306
    options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

Some may have included additional information on why do you need env inside the MySQL service, some may not. But basically, services have stopped automatically receiving all env values from the job-level scope, and you need to copy-paste them manually.

There might be several variations of the ports value.

  1. Here you will need to use 3306 later in your workflow, but depending on your setup you may have port conflicts.
ports:
  - 3306:3306
  1. Here you redefine the local port to 33306. But in this case, you need to be able to redefine the port everywhere in your code.
ports:
  - 33306:3306
  1. Or even a bit more complicated solution, where later in your workflow steps you need to retrieve the port manually using ${{ job.services.mysql.ports['3306'] }}:
ports:
  - 3306

But in my experience, none of those ways worked and I was always receiving this error:

Failed to initialize, mysql service is unhealthy.

It looks like this:

GitHub Actions: "mysql service is unhealthy" error

Ubuntu can’t connect to the MySQL service

It most likely means that a host (ubuntu-20.04) can’t connect to a separate MySQL container that is created using your services:mysql details due to ports issues.

The easiest way to work with MySQL in GitHub Actions

Ever wondered why there are official PostgreSQL and Redis services guides available for you on docs.github.com, but not for MySQL?

That’s because MySQL 5.7 is pre-installed on Ubuntu 18.04 containers (and MySQL 8 on 20 and latest), but not running by default. Here is a related announcement by GitHub. That means you don’t need services:mysql at all, you just need to start the built-in mysql process.

I haven’t found this information in any official docs, but the default MySQL login and password are both root. Update: they have this information in their repository. Here is an example for ubuntu-20.04.

Below is the configuration code I crafted to make MySQL work for me:

env:
  DB_DATABASE: test_db
  DB_USER: root
  DB_PASSWORD: root
steps:
  - name: Set up MySQL
    run: |
      sudo /etc/init.d/mysql start
      mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}

The use of env variables is not mandatory, but I re-use those values in one of the workflow steps later so that’s why I put them separately.

Here is what you will see in GitHub interface:

GitHub Actions: MySQL warning when passing root password via cli

Successfully started MySQL

That warning:

Using a password on the command line interface can be insecure.

is valid when you operate with a live/staging database. In my case, I was using MySQL to run tests so it’s not really relevant.

I hope this post and the approach above will help you save hours of googling and debugging various MySQL errors while using Ubuntu environment to run tests or do whatever you need.

Андрей Моисейкин

Не могу справиться с шагом:

1.Настройте Github Actions так, чтобы он запускал make lint.

Вот что мне выдает в отчете Actions:

  1. Run make lint
  2. poetry run flake8 brain_games
  3. make: poetry: Command not found
  4. Makefile:17: recipe for target ‘lint’ failed
  5. make: *** [lint] Error 127
  6. Error: Process completed with exit code 2.

Что с этим делать у меня вообще нет предположений. Уже как только файл yml не правил. Вот что сейчас там:

name: linter-check

on: push

jobs:

linter-check:

runs-on: ubuntu-latest

steps:

 - name:Checkout code

   uses: actions/checkout@v2

 - name: Run Linter

   run: |

     make lint


9


0

Сергей К.

Андрей, добрый день! Давайте вместе проанализируем вывод сообщения. О какой ошибке сообщает Actions?


0

Андрей Моисейкин

Сергей К.,

  1. make: poetry: Command not found — Сообщает о том, что команда make poetry(?) не найдена
  2. Makefile:17: recipe for target ‘lint’ failed — Здесь что-то про то, что указание для ‘lint’ не удалось.

Пока что у меня так и нет идей, где ошибка. Команды make poetry у меня нет. Линтер, если его отдельно запускать, работает.


0

Сергей К.

В вашем экшене запускается make lint. Эта команда пытается запустить poetry, но гитхаб ничего не знает о poetry, т.к. он не установлен.


0

Андрей Моисейкин

Сергей К., в задании было «Настройте Github Actions так, чтобы он запускал make lint») Переписал как в шаблонном проекте, все заработало. Спасибо!
Когда писал, я сравнивал между собой шаблонный проект и тот пример, что был в документации action. Там одной командой запуск линтера сделан. Поэтому я решил, что можно прописать только запуск make lint


0

Сергей К.

make lint запускает вашу команду. И в неё вы можете добавить всё, что захотите. Гитхаб ничего от себя не добавляет. Поэтому необходимо позаботиться о том, чтобы установить заранее всё, что необходимо.


0

Андрей Моисейкин

Сергей К., правильно я понял, что этими командами я указываю как собрать проект и установить нужные зависимости на стороне actions, чтобы он смог запустить команду make lint?


0

Сергей К.

О каких командах идёт речь? На github actions выполняются только те команды, которые вы ему укажете.


0

Андрей Моисейкин

Сергей К., я имею ввиду, что я указываю команды для github actions и он на свой стороне собирает/устанавливает проект?
Вот эти команды:
>pip install poetry
>make install


0

Сергей К.

Да, вы указываете github actions и базовый образ и все команды, которые нужно запустить после его запуска.


0

Понравилась статья? Поделить с друзьями:
  • Error procedure ms sql
  • Error proc not found
  • Error problem allocating bios buffer
  • Error printf was not declared in this scope
  • Error printer queue setup failed error successful ok ignored or substituted attributes