Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error Run on Remote Device
Forum Updated to NodeBB v4.3 + New Features

Error Run on Remote Device

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
8 Posts 5 Posters 1.9k 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.
  • N Offline
    N Offline
    neda
    wrote on last edited by neda
    #1

    Hi,
    I want to execute a qt application from Ubuntu (ubuntu-17.04-desktop-amd64) to raspberry pi3 (Raspbian).
    I add "Generic Linux Device" (Device test successfully).
    But when I run application, I have this errors:

    bash: /home/pi/Test: cannot execute binary file: Exec format error
    bash: /home/pi/Test: Success
    Application finished with exit code 126
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you check the architecture of your application/Qt version used ?

      What do you have if you call file name_of_your_application ?

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

      1 Reply Last reply
      1
      • S Offline
        S Offline
        shivaVMC
        wrote on last edited by
        #3

        Hi SGaist,
        I want to execute a qt application from Ubuntu (ubuntu-18.04-desktop-amd64) to raspberry pi3 (Raspbian).
        I add "Generic Linux Device" (Device test successfully).
        But when I run application, I have this errors:

        bash: /home/pi/Test: cannot execute binary file: Exec format error
        Application finished with exit code 126

        Can you please suggest on this ?

        file Test ---> shows below message
        Test: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=9ba1ba8adb378c2a30e8c683174bb8a5f5d65beb, not stripped

        jsulmJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Likely because you used your desktop Qt version to build your application. You have to use a cross-compiled version of Qt for the RPi3 to build an application that will run on that device.

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

          S 1 Reply Last reply
          2
          • S shivaVMC

            Hi SGaist,
            I want to execute a qt application from Ubuntu (ubuntu-18.04-desktop-amd64) to raspberry pi3 (Raspbian).
            I add "Generic Linux Device" (Device test successfully).
            But when I run application, I have this errors:

            bash: /home/pi/Test: cannot execute binary file: Exec format error
            Application finished with exit code 126

            Can you please suggest on this ?

            file Test ---> shows below message
            Test: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=9ba1ba8adb378c2a30e8c683174bb8a5f5d65beb, not stripped

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @shivaVMC Raspberry Pi has an ARM CPU not x86. You need to cross compile Qt and your app for ARM.
            Take a look at https://medium.com/@au42/the-useful-raspberrypi-cross-compile-guide-ea56054de187

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2
            • SGaistS SGaist

              Likely because you used your desktop Qt version to build your application. You have to use a cross-compiled version of Qt for the RPi3 to build an application that will run on that device.

              S Offline
              S Offline
              shivaVMC
              wrote on last edited by
              #6

              @SGaist
              Thanks for quick responses.
              From https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step When I run
              cd qtbase_5.10/examples/opengl/qopenglwidget
              ~/raspi/qt5/bin/qmake

              I dont find qmake file in ~/raspi/qt5/bin/ directory except fixqt4headers.pl syncqt.pl

              I renamed qtbase to qtbase_5.10(Any Issue on renaming,)

              jsulmJ Pablo J. RoginaP 2 Replies Last reply
              0
              • S shivaVMC

                @SGaist
                Thanks for quick responses.
                From https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step When I run
                cd qtbase_5.10/examples/opengl/qopenglwidget
                ~/raspi/qt5/bin/qmake

                I dont find qmake file in ~/raspi/qt5/bin/ directory except fixqt4headers.pl syncqt.pl

                I renamed qtbase to qtbase_5.10(Any Issue on renaming,)

                jsulmJ Online
                jsulmJ Online
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @shivaVMC Did you cross compile Qt for RPi?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • S shivaVMC

                  @SGaist
                  Thanks for quick responses.
                  From https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step When I run
                  cd qtbase_5.10/examples/opengl/qopenglwidget
                  ~/raspi/qt5/bin/qmake

                  I dont find qmake file in ~/raspi/qt5/bin/ directory except fixqt4headers.pl syncqt.pl

                  I renamed qtbase to qtbase_5.10(Any Issue on renaming,)

                  Pablo J. RoginaP Offline
                  Pablo J. RoginaP Offline
                  Pablo J. Rogina
                  wrote on last edited by
                  #8

                  @shivaVMC please don't double post your issue.

                  You've already hijacked this post. I suggest you continue with this one that you created.

                  Upvote the answer(s) that helped you solve the issue
                  Use "Topic Tools" button to mark your post as Solved
                  Add screenshots via postimage.org
                  Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0

                  • Login

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