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 Update on Tuesday, May 27th 2025

Cross compilation with X11

Scheduled Pinned Locked Moved Solved Mobile and Embedded
49 Posts 5 Posters 22.4k 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
    #6

    What you did is install the dependencies to build Qt for your computer. What you need to do is install them for your target. So the simplest way is to login to your target, install all the needed dependencies.

    The you can e.g. mount your device filesystem in a place on your computer using e.g. sshfs and give the -sysroot parameter to configure pointing to where your mounted the device fs. It should then pick the headers and libraries from there and continue its work

    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
    • C Offline
      C Offline
      ChaitraMohan
      wrote on last edited by
      #7

      Hi,

      I successfully cross compiled Qt source using sysroot.
      Thank you so much.

      I have one more problem.
      I created a sample application and tried to compile it.
      As it was not accessible for the sysroot or something else I was unable to build my QT application in the Qt creator.

      I got the following error:
      @cc1plus: error: /media/SSHFS_X11/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc/include: Permission denied
      cc1plus: error: /media/SSHFS_X11/usr/include/.: Permission denied
      cc1plus: error: /media/SSHFS_X11/usr/include/arm-linux-gnueabihf: Permission denied
      cc1plus: error: /media/SSHFS_X11/usr/include: Permission denied@

      I tried to make changes in Tools->Options->Build and Run->Kits->sysroot I tried to include the mounted file system, but it was blank and nothing I could include it from my mounted file system SSHFS_X11.

      Can I know what I need to do now? Please help me to resolve this issue.

      Thank you.

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

        Did you check that you have read rights on you mounted file system ? Also did you mount it to the same place you used when cross-compiling Qt ?

        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
        • C Offline
          C Offline
          ChaitraMohan
          wrote on last edited by
          #9

          Hi,
          Yes I have mounted on the place as I had while cross compiling.

          I have permission to read/write but as a root. Its as shown below:
          @drwxr-xr-x 2 root root 4096 Jun 11 2013 cdrom
          drwxrwx--- 2 root vboxsf 4096 Jun 12 2013 sf_UbuntuSharedFolder
          drwxr-xr-x 1 root root 4096 Oct 6 11:28 SSHFS_X11@

          1 Reply Last reply
          0
          • C Offline
            C Offline
            ChaitraMohan
            wrote on last edited by
            #10

            Hi,

            I resolved that issue. The problem was while mounting the file system using ssfhs I had not provided an option i.e allow_other. So it was showing permission denied error
            Thank you.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              ChaitraMohan
              wrote on last edited by
              #11

              Hi,

              All my problem solved. Now Qt application is running on gnome.
              Thank you so much for the help :) :)

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

                You're welcome !

                Since you have your application working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

                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
                • C Offline
                  C Offline
                  ChaitraMohan
                  wrote on last edited by
                  #13

                  Hi,

                  Ya sure I will do it.
                  I have one more problem. Keyboard is not working after running the application.
                  How can I enable it?

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

                    How are you starting your application ? What type of keyboard is it ?

                    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
                    • C Offline
                      C Offline
                      ChaitraMohan
                      wrote on last edited by
                      #15

                      I am using USB Keyboard.
                      I am starting the application by giving the command in the terminal:
                      @./Test_app@

                      Keyboard works till application runs after application start running it doesn't work.

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

                        Still using X11 ?

                        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
                        • C Offline
                          C Offline
                          ChaitraMohan
                          wrote on last edited by
                          #17

                          Yes Qt application running on X11.

                          1 Reply Last reply
                          0
                          • SGaistS SGaist

                            What you did is install the dependencies to build Qt for your computer. What you need to do is install them for your target. So the simplest way is to login to your target, install all the needed dependencies.

                            The you can e.g. mount your device filesystem in a place on your computer using e.g. sshfs and give the -sysroot parameter to configure pointing to where your mounted the device fs. It should then pick the headers and libraries from there and continue its work

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

                            @SGaist
                            Hi, I have followed same steps. It's works.
                            Is it possible build without target device ?
                            Could you please help me on this. Thanks in advance!

                            jsulmJ 1 Reply Last reply
                            0
                            • T thanga

                              @SGaist
                              Hi, I have followed same steps. It's works.
                              Is it possible build without target device ?
                              Could you please help me on this. Thanks in advance!

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

                              @thanga said in [SOLVED]Qt cross compilation with X11:

                              Is it possible build without target device ?

                              Can you explain what you mean?
                              You can build without target device if you have a sysroot for it.

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

                              T 1 Reply Last reply
                              0
                              • jsulmJ jsulm

                                @thanga said in [SOLVED]Qt cross compilation with X11:

                                Is it possible build without target device ?

                                Can you explain what you mean?
                                You can build without target device if you have a sysroot for it.

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

                                @jsulm

                                I have mounted target device on /media/SSHFS_X11/ path on host machine (Ubuntu). While mounted Qt getting build, If I disconnect the target device. I am getting following error:
                                Basic XLib functionality test failed!
                                You might need to modify the include and library search paths by editing
                                QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/lolveley/bin/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++.

                                May I know how to build without target device ? And how to configure sysroot on host (Ubuntu) machine ?

                                Could you please help me on this...

                                jsulmJ 1 Reply Last reply
                                0
                                • T thanga

                                  @jsulm

                                  I have mounted target device on /media/SSHFS_X11/ path on host machine (Ubuntu). While mounted Qt getting build, If I disconnect the target device. I am getting following error:
                                  Basic XLib functionality test failed!
                                  You might need to modify the include and library search paths by editing
                                  QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/lolveley/bin/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++.

                                  May I know how to build without target device ? And how to configure sysroot on host (Ubuntu) machine ?

                                  Could you please help me on this...

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

                                  @thanga Just create a directory and copy the content of your target device to that directory. Then use this directory as your sysroot instead of /media/SSHFS_X11.

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

                                  T 1 Reply Last reply
                                  1
                                  • jsulmJ jsulm

                                    @thanga Just create a directory and copy the content of your target device to that directory. Then use this directory as your sysroot instead of /media/SSHFS_X11.

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

                                    @jsulm
                                    I have copied /usr dir files to /media/SSHFS_X11, and tried to build But still and getting following error,
                                    Basic XLib functionality test failed!
                                    You might need to modify the include and library search paths by editing
                                    QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/lolveley/bin/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++.

                                    Is it required to copy all the contents or /usr dir is fine?

                                    Target device also Ubuntu OS stand alone device.

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • T thanga

                                      @jsulm
                                      I have copied /usr dir files to /media/SSHFS_X11, and tried to build But still and getting following error,
                                      Basic XLib functionality test failed!
                                      You might need to modify the include and library search paths by editing
                                      QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/lolveley/bin/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++.

                                      Is it required to copy all the contents or /usr dir is fine?

                                      Target device also Ubuntu OS stand alone device.

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

                                      @thanga You need to copy everything what is needed. You should copy at least /usr/lib and /usr/include, probably /lib as well.
                                      It should then look like:

                                      /media/SSHFS_X11/usr/include
                                      /media/SSHFS_X11/usr/lib
                                      /media/SSHFS_X11/lib
                                      

                                      Call configure with -v parameter to see what exactly is missing if it says "Basic XLib functionality test failed!".

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

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

                                        If you don't use the same folder as you did when configuring the first time then you should point configure to the new location. Note that you should do a build from scratch to avoid any leftovers from interfering.

                                        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
                                        • jsulmJ jsulm

                                          @thanga You need to copy everything what is needed. You should copy at least /usr/lib and /usr/include, probably /lib as well.
                                          It should then look like:

                                          /media/SSHFS_X11/usr/include
                                          /media/SSHFS_X11/usr/lib
                                          /media/SSHFS_X11/lib
                                          

                                          Call configure with -v parameter to see what exactly is missing if it says "Basic XLib functionality test failed!".

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

                                          @jsulm
                                          I have copied /usr/lib, /usr/include and /lib files to /media/SSHFS_X11/. I am getting following error now,

                                          /media/SSHFS_X11/usr/include/./X11/Xlib.h:38:23: fatal error: sys/types.h: No such file or directory
                                          compilation terminated.
                                          make: *** [xlib.o] Error 1
                                          XLib disabled.
                                          Basic XLib functionality test failed!
                                          You might need to modify the include and library search paths by editing
                                          QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/user/qt-everywhere-opensource-src-4.8.6/mkspecs/qws/linux-arm-linaro-g++.

                                          jsulmJ 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