Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator upload/run doesn't work for QNX

QtCreator upload/run doesn't work for QNX

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qtcreatorqnxdevice
4 Posts 2 Posters 1.4k Views
  • 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.
  • E Offline
    E Offline
    ewindes
    wrote on 3 Mar 2020, 15:40 last edited by
    #1

    I'm attempting to use QtCreator to launch a simple test program on my Qnx target. In the device options, I've configured my QNX (7.0.0) device, and running the "Test" button produces "Device test finished successfully."

    In my project settings, under the "Run" actions for my QNX kit, I configured "Upload files via SFTP", and cleared the "incremental deployment" flag.

    When I attempt to run my project, the binary file is uploaded to the target as expected, but is not run.

    The message shown is:
    "warning: Failed to retrieve remote timestamp for file [...] Incremental deployment will not work. Error message was: sh: stat: cannot execute - No such file or directory"

    I can ssh to my target and run the uploaded file, but QtCreator won't run it.

    There is no "stat" command available on QNX, and the GNU coreutils package (which includes stat) does not compile easily on QNX.

    If I've turned off "incremental deployment", QtCreator shouldn't need to make the check that is failing.

    A 1 Reply Last reply 3 Mar 2020, 17:39
    0
    • E ewindes
      3 Mar 2020, 15:40

      I'm attempting to use QtCreator to launch a simple test program on my Qnx target. In the device options, I've configured my QNX (7.0.0) device, and running the "Test" button produces "Device test finished successfully."

      In my project settings, under the "Run" actions for my QNX kit, I configured "Upload files via SFTP", and cleared the "incremental deployment" flag.

      When I attempt to run my project, the binary file is uploaded to the target as expected, but is not run.

      The message shown is:
      "warning: Failed to retrieve remote timestamp for file [...] Incremental deployment will not work. Error message was: sh: stat: cannot execute - No such file or directory"

      I can ssh to my target and run the uploaded file, but QtCreator won't run it.

      There is no "stat" command available on QNX, and the GNU coreutils package (which includes stat) does not compile easily on QNX.

      If I've turned off "incremental deployment", QtCreator shouldn't need to make the check that is failing.

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 3 Mar 2020, 17:39 last edited by
      #2

      Hi @ewindes ,

      which Creator version is this? And on which OS?

      IIRC, with Creator 4.9 there was a bigger change in the deployment code, so you could try an older version.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        ewindes
        wrote on 3 Mar 2020, 17:50 last edited by
        #3

        Thanks for the reply. I'm using Qt Creator 4.11.1, running on Linux.

        I think I stumbled across the solution. I had "Run in terminal" checked under the Run configuration section. Cleared that option, and my program runs! I still see the warning from the deploy step, but it's not fatal.

        I think we can call this solved.

        1 Reply Last reply
        1
        • E Offline
          E Offline
          ewindes
          wrote on 4 Mar 2020, 17:21 last edited by
          #4

          After further testing, the issue isn't the "run in terminal" setting.

          Instead, it seems that if I'm using the QtQuick/QML stuff, then QtCreator reports the following:

          11:16:51: Starting /tmp/QmlTest/bin/QmlTest ...
          11:16:51: Application finished with exit code 0.

          i.e. it runs, but exits immediately, with no error code.

          If I then ssh into my target and manually run the same binary, I see the expected output on the screen, and it doesn't exit until I kill it with ^C.

          I don't see this issue if I run an QtWidget application.

          The C++ launcher for the QmlTest application is below. The contents of the QML file doesn't seem to matter.

          #include <QGuiApplication>
          #include <QQuickView>

          int main(int argc, char *argv[])
          {
          QGuiApplication app(argc, argv);

          QQuickView *view = new QQuickView;
          view->setSource(QUrl(QLatin1String("qrc:/main.qml")));
          view->show();
          return app.exec();
          

          }

          1 Reply Last reply
          0

          1/4

          3 Mar 2020, 15:40

          • Login

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