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 compilation with X11
Forum Updated to NodeBB v4.3 + New Features

Cross compilation with X11

Scheduled Pinned Locked Moved Solved Mobile and Embedded
49 Posts 5 Posters 23.1k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #28

    Did you do a full copy of the sysroot over to your desktop ?

    On a side note, unless you're locked to that version, at least use the latest of the Qt 4 series which is 4.8.7. Even better if you migrate to Qr 5.

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

    T 1 Reply Last reply
    0
    • SGaistS SGaist

      Did you do a full copy of the sysroot over to your desktop ?

      On a side note, unless you're locked to that version, at least use the latest of the Qt 4 series which is 4.8.7. Even better if you migrate to Qr 5.

      T Offline
      T Offline
      thanga
      wrote on last edited by
      #29

      @SGaist

      Yes. I have copied all the files. May I know how to configured sysroot on local desktop ? Could please tell me the steps.

      jsulmJ 1 Reply Last reply
      0
      • T thanga

        @SGaist

        Yes. I have copied all the files. May I know how to configured sysroot on local desktop ? Could please tell me the steps.

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

        @thanga "Could please tell me the steps" - we already did.
        Does this file exist on your target device?
        Did you copy recursively (I mean: including subdirectories)?

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

        T 1 Reply Last reply
        0
        • jsulmJ jsulm

          @thanga "Could please tell me the steps" - we already did.
          Does this file exist on your target device?
          Did you copy recursively (I mean: including subdirectories)?

          T Offline
          T Offline
          thanga
          wrote on last edited by
          #31

          @jsulm
          Thanks!! I have copied target device files, I can able to create QT qmake file now.

          I need build application without adding target device on Qt Creator. is it possible to build like this ??

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

            What do you mean by "without adding target device on Qt Creator" ?

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

            T 1 Reply Last reply
            0
            • SGaistS SGaist

              What do you mean by "without adding target device on Qt Creator" ?

              T Offline
              T Offline
              thanga
              wrote on last edited by
              #33

              @SGaist

              We are mounting and adding Beagleboard device (on Qt Creator) for compiling Qt application.

              Add device on Qt Creator:
              Qt Creator -> Tools -> Devices -> Add Device

              Mounting Device (Beagleboard):
              /media/SSHFS_X11/

              Is it possible to compile Qt application without Beagleboard device ?

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

                If you don't want to mount the device root filesystem while developing then you have to provide a sysroot to work with.

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

                T 1 Reply Last reply
                0
                • SGaistS SGaist

                  If you don't want to mount the device root filesystem while developing then you have to provide a sysroot to work with.

                  T Offline
                  T Offline
                  thanga
                  wrote on last edited by
                  #35

                  @SGaist
                  Hi,
                  thanks, I got confused on providing "sysroot".
                  I am looking for a way to cross compile Qt application for beaglebone without adding and mounting to Host PC either through SCP or as file system. Because to update and rebuild the Qt application each time its leading to mount the device to PC host.
                  Is there any other way to do? or it is not possible !!!

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

                    If you don't want to mount your device while developing for it then you have to copy its root filesystem on your computer and use that copy as sysroot when cross-compiling Qt. You will also have to keep that copy up to date if you need to add a new dependency for 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

                    T 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      If you don't want to mount your device while developing for it then you have to copy its root filesystem on your computer and use that copy as sysroot when cross-compiling Qt. You will also have to keep that copy up to date if you need to add a new dependency for your application.

                      T Offline
                      T Offline
                      thanga
                      wrote on last edited by
                      #37

                      @SGaist
                      Thanks! How to compile Qt application without device ?

                      We are adding device on Qt Creator, is it possible to compile the application without device ? Please check the below link for your reference.

                      Qt Creator link: http://www.qnx.com/developers/docs/660/topic/com.qnx.doc.qt/images/qt_creator_add_device_button.png
                      http://docs.toradex.com/101754-01-qtcreator-linux-devices.png

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

                        I already wrote it several times: if you want to cross-compile without any device connected, then copy the root filesystem of your device on your desktop machine and cross-compile Qt using it.

                        One thing to be clear: if you want to run your cross-compiled application, then you need your device accessible to run said application.

                        Out of curiosity, why do you want that much to cross-compile an application without any device connected to confirm it runs properly ?

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

                        T 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          I already wrote it several times: if you want to cross-compile without any device connected, then copy the root filesystem of your device on your desktop machine and cross-compile Qt using it.

                          One thing to be clear: if you want to run your cross-compiled application, then you need your device accessible to run said application.

                          Out of curiosity, why do you want that much to cross-compile an application without any device connected to confirm it runs properly ?

                          T Offline
                          T Offline
                          thanga
                          wrote on last edited by
                          #39

                          @SGaist
                          One of our device is not on network and cannot be mounted. We would like to cross compile the code using QTCreator and copy the executable manually on the target using a SD Card. Let us know if this is possible.
                          If yes, then what should be the hostname and credentials in QTCreator Add Device screen?

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

                            Since your device is out of reach, it doesn't make sense to put anything there. Just don't add any device. Build your executable and then copy it on your SD card.

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

                            T 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Since your device is out of reach, it doesn't make sense to put anything there. Just don't add any device. Build your executable and then copy it on your SD card.

                              T Offline
                              T Offline
                              thanga
                              wrote on last edited by
                              #41

                              @SGaist
                              Thanks! I have tried it in the same method. I am getting following error. Could please check it,

                              usr/local/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: note: 'clock_gettime@@GLIBC_2.4' is defined in DSO /media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1 so try adding it to the linker command line
                              /media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1: could not read symbols: Invalid operation

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

                                Is that were your device root filesystem has been copied ?

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

                                T 1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  Is that were your device root filesystem has been copied ?

                                  T Offline
                                  T Offline
                                  thanga
                                  wrote on last edited by thanga
                                  #43

                                  @SGaist
                                  QTCreator has an option sysroot wherein it expects the sysroot of the target board. Should the path be the mounted path on actual board ?

                                  If we have limited set of boards, can we create the ISO image of the target device, copy it on SD Card and then mount it and use this path as Sysroot path. Can we use this to create multiple development systems(environment) which are not dependent on target board.

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

                                    You can copy the content of the root filesystem of your device only our desktop computer and use that as sysroot. Just keep in mind that you'll have to keep it up to date yourself.

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

                                    T 1 Reply Last reply
                                    0
                                    • SGaistS SGaist

                                      You can copy the content of the root filesystem of your device only our desktop computer and use that as sysroot. Just keep in mind that you'll have to keep it up to date yourself.

                                      T Offline
                                      T Offline
                                      thanga
                                      wrote on last edited by
                                      #45

                                      @SGaist
                                      We have copied the contents of the root filesystem and tried to compile it. We are getting an error as mentioned below. Please note that we are mounting this on a i386 32 bit machine. The target board is arm-linux.

                                      ./NewQTApp/release/build/arm926/libftd2xx.a(ftd2xx.o): In function `InitCheckDevice':
                                      ftd2xx.c:(.text+0x2d0): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
                                      /usr/local/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: ../NewQTApp/release/build/arm926/libftd2xx.a(linux_usbfs.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.4'
                                      /usr/local/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: note: 'clock_gettime@@GLIBC_2.4' is defined in DSO /media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1 so try adding it to the linker command line
                                      /media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1: could not read symbols: Invalid operation
                                      collect2: error: ld returned 1 exit status
                                      make: *** [NewQTApp] Error 1
                                      20:15:03: The process "/usr/bin/make" exited with code 2.
                                      Error while building/deploying project NewQTApp (kit: Linaro)

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

                                        Looks like there's a mismatch between the version of gcc used to build your application and the one used for the sysroot.

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

                                        T 1 Reply Last reply
                                        0
                                        • SGaistS SGaist

                                          Looks like there's a mismatch between the version of gcc used to build your application and the one used for the sysroot.

                                          T Offline
                                          T Offline
                                          thanga
                                          wrote on last edited by
                                          #47

                                          @SGaist
                                          Thank you very much!!! Finally, it's working fine. I can able build Qt application without the real (Target) device.
                                          Thanks!!

                                          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