Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    Mobile and Embedded
    3
    9
    2130
    Loading More Posts
    • 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 Jin
      Jerry Jin last edited by

      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 Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion last edited by

        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 Jin 1 Reply Last reply Reply Quote 0
        • Jerry Jin
          Jerry Jin @jsulm last edited by

          @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 Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion last edited by

            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 Jin 1 Reply Last reply Reply Quote 0
            • Jerry Jin
              Jerry Jin @jsulm last edited by

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

              jsulm 1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Jin 1 Reply Last reply Reply Quote 0
                • jsulm
                  jsulm Lifetime Qt Champion @Jerry Jin last edited by

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

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

                  1 Reply Last reply Reply Quote 0
                  • Jerry Jin
                    Jerry Jin @SGaist last edited by

                    @SGaist Yes,I am sure.

                    1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      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 Reply Quote 0
                      • First post
                        Last post