Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cross compiled application exits with exit code 1 at startup on embedded device
Forum Updated to NodeBB v4.3 + New Features

Cross compiled application exits with exit code 1 at startup on embedded device

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 3 Posters 2.8k Views 1 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.
  • Jerry JinJ Offline
    Jerry JinJ Offline
    Jerry Jin
    wrote on last edited by
    #1

    Hello everybody.
    I cross compiled QT 5.6.0 for ARM (Xilinx zynq70z0) with the following configuration:
    ./configure -prefix /usr/local/xilinxconf
    -device linux-arm-xilinx-zynq-g++
    -device-option CROSS_COMPILE=arm-xilinx-linux-gnueabi-
    -release

    I configured QTCreator on my PC for targeting the just cross-compiled QT version and then I am deploying a simple test program to my embedded device:
    #include <QCoreApplication>
    #include <QDebug>  
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
        qDebug() << "Hello world!" << endl;  
        return a.exec();
    }
    At run-time the application immediately exits with code 1 (QTCreator application output says “Application finished with exit code 1”). Even attaching the debugger (GDB) I was not able to get any further information. I tried to “strace” my application, but even in this case I can’t find the reason for the application abort…
    Can somebody tell me why my application exits with error?

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      How do you deploy your application?
      Do you have all needed libraries on the target?

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

      Jerry JinJ 1 Reply Last reply
      0
      • jsulmJ jsulm

        How do you deploy your application?
        Do you have all needed libraries on the target?

        Jerry JinJ Offline
        Jerry JinJ Offline
        Jerry Jin
        wrote on last edited by
        #3

        @jsulm I think I have put all the needed libraries on the device /usr/local/xilinxembedded/lib , the same path as my PC.

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

          If you have ldd on your target you can check with

          ldd EXE_NAME
          

          whether all libs are there.

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

          Jerry JinJ 1 Reply Last reply
          0
          • jsulmJ jsulm

            If you have ldd on your target you can check with

            ldd EXE_NAME
            

            whether all libs are there.

            Jerry JinJ Offline
            Jerry JinJ Offline
            Jerry Jin
            wrote on last edited by
            #5

            @jsulm Thanks for reply.
            I have execude the ldd command and it says : not a dynamic executable.

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

              Hi and welcome to devnet,

              Are you sure you are building your application with the Qt version you cross-compiled ?

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

              Jerry JinJ 1 Reply Last reply
              0
              • Jerry JinJ Jerry Jin

                @jsulm Thanks for reply.
                I have execude the ldd command and it says : not a dynamic executable.

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

                @Jerry-Jin Did you execute ldd on the target?

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

                1 Reply Last reply
                0
                • SGaistS SGaist

                  Hi and welcome to devnet,

                  Are you sure you are building your application with the Qt version you cross-compiled ?

                  Jerry JinJ Offline
                  Jerry JinJ Offline
                  Jerry Jin
                  wrote on last edited by
                  #8

                  @SGaist Yes,I am sure.

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

                    What about the call to ldd that @jsulm asked ?

                    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
                    0

                    • Login

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