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. Cross Compile With/Without Sysroot
Forum Updated to NodeBB v4.3 + New Features

Cross Compile With/Without Sysroot

Scheduled Pinned Locked Moved Solved Installation and Deployment
32 Posts 5 Posters 6.0k Views 4 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.
  • sierdzioS sierdzio

    You need to copy /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf to root / of your device.

    But yeah, something doesn't seem right here.

    P Offline
    P Offline
    Parvez Khan
    wrote on last edited by
    #10

    @sierdzio How can I resolve it? I have been trying a lot of things from more than 2 weeks now. It seems the guide: https://wiki.qt.io/BeagleBone_Black_Beginners_Guide is pretty old and outdated, the commands in the guide isn't working as described. I tried with the exact same version of the debian and ubuntu and followed the every single step as it written in the guide and I end up with the following error:

    /home/khan/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to log10@GLIBC_2.4' /home/khan/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference tocosh@GLIBC_2.4'
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:91: atomicfptr] Error 1
    std::atomic for function pointers disabled.
    ERROR: detected a std::atomic implementation that fails for function pointers.
    Please apply the patch corresponding to your Standard Library vendor, found in
    /home/khan/qt5.7/qt5/qtbase/config.tests/common/atomicfptr

    It seems I am lost I don't know what to do.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Parvez Khan
      wrote on last edited by
      #11

      @SGaist @jsulm @mrjj @jKSH @kshegunov @sierdzio You all QT experts, please help me out with this problem.

      Your help is much appreciated.

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

        While the steps of the guide are likely still valid, the versions of the various components have likely changed.

        You should update them based on the actual version of the distribution you are using on the device.

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

        P 1 Reply Last reply
        0
        • SGaistS SGaist

          While the steps of the guide are likely still valid, the versions of the various components have likely changed.

          You should update them based on the actual version of the distribution you are using on the device.

          P Offline
          P Offline
          Parvez Khan
          wrote on last edited by
          #13

          @SGaist Hi SGaist is there a tutorial or guide available for the new versions of the distribution?

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

            That I do not know.

            We have a user here that did cross-compile successfully a more recent version here.

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

            P 1 Reply Last reply
            0
            • SGaistS SGaist

              That I do not know.

              We have a user here that did cross-compile successfully a more recent version here.

              P Offline
              P Offline
              Parvez Khan
              wrote on last edited by Parvez Khan
              #15

              @SGaist You are right. That is exactly what I did and I had success in that not completely though it did worked for a simple qt project. Let me try to explain it again I think not having much knowledge in Linux I must be using wrong terminologies in my questions which is becoming an hindrance in getting my message across. Let me try again.

              So in the following configure commend you see I am using the sysroot-glibc-linaro files that I downloaded from the linaro website.

              ./configure -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/khan/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -no-openssl -no-opengl -v
              

              After the configuration process completes a folder is produced named 'qt5bbb' in the /usr/local/ directory of the host I copied this folder to the target /usr/local everything works flawlessly. I created a simple push button project, build it, deploy it works.

              Now I needed serial module, so to get that I compiled the qtserialport module from the downloaded qt source code folder using the following command:

              sudo /usr/local/qt5bbb/bin/qmake /home/khan/qt-everywhere-src-5.15.2/qtserialport/qtserialport.pro -spec devices/linux-beagleboard-g++
              

              When process is complete I get the following message in the terminal:

              Running configuration tests...
              Done running configuration tests.
              
              Configure summary:
              
              Serial Port:
                ntddmodm ............................... no
              
              Qt is now configured for building. Just run 'make'.
              Once everything is built, you must run 'make install'.
              Qt will be installed into '/home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb'.
              
              

              So here is the problem you see that message in the last line the new module files are being installed in the directory /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb not in the /usr/local/qt5bbb. This is where things are going sideways, once again I copied the /usr/local/qt5bbb directory from the host to /usr/local/qt5bbb directory of the target. I tired a simple serial project but I got an error:

              /home/debian/GC_1.pro: error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory
              14:42:16: Application finished with exit code 127.
              

              No surprise in that error because the serial module files are not synced with the target yet so now this time I copied the qt5bbb folder /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb of the host to the /usr/local/qt5bbb directory of the target because that is where the serial module files are located right!

              Then I tried deploying a simple serial module project and guess what I get the following error:

              qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
              This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
              
              Available platform plugins are: linuxfb, minimal, offscreen, vnc.
              
              14:54:10: Remote process crashed.
              

              This is where I am stuck at, I wish I knew what I am doing wrong.

              JonBJ sierdzioS 2 Replies Last reply
              0
              • P Parvez Khan

                @SGaist You are right. That is exactly what I did and I had success in that not completely though it did worked for a simple qt project. Let me try to explain it again I think not having much knowledge in Linux I must be using wrong terminologies in my questions which is becoming an hindrance in getting my message across. Let me try again.

                So in the following configure commend you see I am using the sysroot-glibc-linaro files that I downloaded from the linaro website.

                ./configure -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/khan/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -no-openssl -no-opengl -v
                

                After the configuration process completes a folder is produced named 'qt5bbb' in the /usr/local/ directory of the host I copied this folder to the target /usr/local everything works flawlessly. I created a simple push button project, build it, deploy it works.

                Now I needed serial module, so to get that I compiled the qtserialport module from the downloaded qt source code folder using the following command:

                sudo /usr/local/qt5bbb/bin/qmake /home/khan/qt-everywhere-src-5.15.2/qtserialport/qtserialport.pro -spec devices/linux-beagleboard-g++
                

                When process is complete I get the following message in the terminal:

                Running configuration tests...
                Done running configuration tests.
                
                Configure summary:
                
                Serial Port:
                  ntddmodm ............................... no
                
                Qt is now configured for building. Just run 'make'.
                Once everything is built, you must run 'make install'.
                Qt will be installed into '/home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb'.
                
                

                So here is the problem you see that message in the last line the new module files are being installed in the directory /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb not in the /usr/local/qt5bbb. This is where things are going sideways, once again I copied the /usr/local/qt5bbb directory from the host to /usr/local/qt5bbb directory of the target. I tired a simple serial project but I got an error:

                /home/debian/GC_1.pro: error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory
                14:42:16: Application finished with exit code 127.
                

                No surprise in that error because the serial module files are not synced with the target yet so now this time I copied the qt5bbb folder /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb of the host to the /usr/local/qt5bbb directory of the target because that is where the serial module files are located right!

                Then I tried deploying a simple serial module project and guess what I get the following error:

                qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
                This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                
                Available platform plugins are: linuxfb, minimal, offscreen, vnc.
                
                14:54:10: Remote process crashed.
                

                This is where I am stuck at, I wish I knew what I am doing wrong.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #16

                @Parvez-Khan said in Cross Compile With/Without Sysroot:

                qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""

                I do do not know whether you are in a useful configured state, but if you want to pursue that further to find the cause, export QT_DEBUG_PLUGINS=1 and then run your executable for diagnostic output.

                P 1 Reply Last reply
                0
                • JonBJ JonB

                  @Parvez-Khan said in Cross Compile With/Without Sysroot:

                  qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""

                  I do do not know whether you are in a useful configured state, but if you want to pursue that further to find the cause, export QT_DEBUG_PLUGINS=1 and then run your executable for diagnostic output.

                  P Offline
                  P Offline
                  Parvez Khan
                  wrote on last edited by
                  #17

                  @JonB Hi JonB, can you elaborate please. After export QT_DEBUG_PLUGINS=1 how can I run executable for diagnostic output?

                  JonBJ 1 Reply Last reply
                  0
                  • P Parvez Khan

                    @JonB Hi JonB, can you elaborate please. After export QT_DEBUG_PLUGINS=1 how can I run executable for diagnostic output?

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #18

                    @Parvez-Khan

                    Then I tried deploying a simple serial module project and guess what I get the following error:

                    However you do that (I don't know) you need to set environment variable QT_DEBUG_PLUGINS to value 1 and then run whatever you run. That will tell you why the eglfs error is occurring. Whether that will help you I don't know :)

                    P 2 Replies Last reply
                    0
                    • JonBJ JonB

                      @Parvez-Khan

                      Then I tried deploying a simple serial module project and guess what I get the following error:

                      However you do that (I don't know) you need to set environment variable QT_DEBUG_PLUGINS to value 1 and then run whatever you run. That will tell you why the eglfs error is occurring. Whether that will help you I don't know :)

                      P Offline
                      P Offline
                      Parvez Khan
                      wrote on last edited by
                      #19

                      @JonB I tried setting the the QT_DEBUG_PLUGINS flag to 1 and execute the project but there is no change in the error message. Thank you for the suggestion though.

                      1 Reply Last reply
                      0
                      • JonBJ JonB

                        @Parvez-Khan

                        Then I tried deploying a simple serial module project and guess what I get the following error:

                        However you do that (I don't know) you need to set environment variable QT_DEBUG_PLUGINS to value 1 and then run whatever you run. That will tell you why the eglfs error is occurring. Whether that will help you I don't know :)

                        P Offline
                        P Offline
                        Parvez Khan
                        wrote on last edited by Parvez Khan
                        #20

                        @JonB Jon I think I have more information this time. Instead of clicking deploy button from the host I SSH into the target and ran ./projectName.pro and here is the result I get from that command:

                        QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5bbb/plugins/platforms" ...
                        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqlinuxfb.so"
                        Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqlinuxfb.so, metadata=
                        {
                            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                            "MetaData": {
                                "Keys": [
                                    "linuxfb"
                                ]
                            },
                            "archreq": 0,
                            "className": "QLinuxFbIntegrationPlugin",
                            "debug": false,
                            "version": 331520
                        }
                        
                        
                        Got keys from plugin meta data ("linuxfb")
                        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqminimal.so"
                        Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqminimal.so, metadata=
                        {
                            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                            "MetaData": {
                                "Keys": [
                                    "minimal"
                                ]
                            },
                            "archreq": 0,
                            "className": "QMinimalIntegrationPlugin",
                            "debug": false,
                            "version": 331520
                        }
                        
                        
                        Got keys from plugin meta data ("minimal")
                        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqoffscreen.so"
                        Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqoffscreen.so, metadata=
                        {
                            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                            "MetaData": {
                                "Keys": [
                                    "offscreen"
                                ]
                            },
                            "archreq": 0,
                            "className": "QOffscreenIntegrationPlugin",
                            "debug": false,
                            "version": 331520
                        }
                        
                        
                        Got keys from plugin meta data ("offscreen")
                        QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqvnc.so"
                        Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqvnc.so, metadata=
                        {
                            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                            "MetaData": {
                                "Keys": [
                                    "vnc"
                                ]
                            },
                            "archreq": 0,
                            "className": "QVncIntegrationPlugin",
                            "debug": false,
                            "version": 331520
                        }
                        
                        
                        Got keys from plugin meta data ("vnc")
                        QFactoryLoader::QFactoryLoader() checking directory path "/home/debian/platforms" ...
                        qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
                        This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                        
                        Available platform plugins are: linuxfb, minimal, offscreen, vnc.
                        
                        Aborted
                        

                        Does it give any insights to what is going on?

                        JKSHJ 1 Reply Last reply
                        0
                        • P Parvez Khan

                          @JonB Jon I think I have more information this time. Instead of clicking deploy button from the host I SSH into the target and ran ./projectName.pro and here is the result I get from that command:

                          QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5bbb/plugins/platforms" ...
                          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqlinuxfb.so"
                          Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqlinuxfb.so, metadata=
                          {
                              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                              "MetaData": {
                                  "Keys": [
                                      "linuxfb"
                                  ]
                              },
                              "archreq": 0,
                              "className": "QLinuxFbIntegrationPlugin",
                              "debug": false,
                              "version": 331520
                          }
                          
                          
                          Got keys from plugin meta data ("linuxfb")
                          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqminimal.so"
                          Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqminimal.so, metadata=
                          {
                              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                              "MetaData": {
                                  "Keys": [
                                      "minimal"
                                  ]
                              },
                              "archreq": 0,
                              "className": "QMinimalIntegrationPlugin",
                              "debug": false,
                              "version": 331520
                          }
                          
                          
                          Got keys from plugin meta data ("minimal")
                          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqoffscreen.so"
                          Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqoffscreen.so, metadata=
                          {
                              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                              "MetaData": {
                                  "Keys": [
                                      "offscreen"
                                  ]
                              },
                              "archreq": 0,
                              "className": "QOffscreenIntegrationPlugin",
                              "debug": false,
                              "version": 331520
                          }
                          
                          
                          Got keys from plugin meta data ("offscreen")
                          QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5bbb/plugins/platforms/libqvnc.so"
                          Found metadata in lib /usr/local/qt5bbb/plugins/platforms/libqvnc.so, metadata=
                          {
                              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                              "MetaData": {
                                  "Keys": [
                                      "vnc"
                                  ]
                              },
                              "archreq": 0,
                              "className": "QVncIntegrationPlugin",
                              "debug": false,
                              "version": 331520
                          }
                          
                          
                          Got keys from plugin meta data ("vnc")
                          QFactoryLoader::QFactoryLoader() checking directory path "/home/debian/platforms" ...
                          qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
                          This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                          
                          Available platform plugins are: linuxfb, minimal, offscreen, vnc.
                          
                          Aborted
                          

                          Does it give any insights to what is going on?

                          JKSHJ Offline
                          JKSHJ Offline
                          JKSH
                          Moderators
                          wrote on last edited by
                          #21

                          @Parvez-Khan said in Cross Compile With/Without Sysroot:

                          Available platform plugins are: linuxfb, minimal, offscreen, vnc.
                          

                          ...

                          Does it give any insights to what is going on?

                          Yes it does.

                          Your copy of Qt is looking for the "eglfs" GUI plugin, but the higher-level GUI plugins were not built

                          • Desktop Linux machines tend to use the "xcb" or "wayland" plugins
                          • Embedded devices often use the "eglfs" plugin

                          However, you don't have any of these; you only have the "linuxfb", "minimal", "offscreen", and "vnc" plugins.

                          The plugins were not built because the sysroot GUI libraries were not found when you configured Qt. (You can check the configure.summary file to see what was as wasn't available)

                          Then I tried deploying a simple serial module project and guess what I get the following error

                          Does your project need a GUI? If not, build a Console application instead of a GUI application. That way, it you don't need the GUI plugins.

                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                          P 1 Reply Last reply
                          2
                          • P Parvez Khan

                            @SGaist You are right. That is exactly what I did and I had success in that not completely though it did worked for a simple qt project. Let me try to explain it again I think not having much knowledge in Linux I must be using wrong terminologies in my questions which is becoming an hindrance in getting my message across. Let me try again.

                            So in the following configure commend you see I am using the sysroot-glibc-linaro files that I downloaded from the linaro website.

                            ./configure -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/khan/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -no-openssl -no-opengl -v
                            

                            After the configuration process completes a folder is produced named 'qt5bbb' in the /usr/local/ directory of the host I copied this folder to the target /usr/local everything works flawlessly. I created a simple push button project, build it, deploy it works.

                            Now I needed serial module, so to get that I compiled the qtserialport module from the downloaded qt source code folder using the following command:

                            sudo /usr/local/qt5bbb/bin/qmake /home/khan/qt-everywhere-src-5.15.2/qtserialport/qtserialport.pro -spec devices/linux-beagleboard-g++
                            

                            When process is complete I get the following message in the terminal:

                            Running configuration tests...
                            Done running configuration tests.
                            
                            Configure summary:
                            
                            Serial Port:
                              ntddmodm ............................... no
                            
                            Qt is now configured for building. Just run 'make'.
                            Once everything is built, you must run 'make install'.
                            Qt will be installed into '/home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb'.
                            
                            

                            So here is the problem you see that message in the last line the new module files are being installed in the directory /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb not in the /usr/local/qt5bbb. This is where things are going sideways, once again I copied the /usr/local/qt5bbb directory from the host to /usr/local/qt5bbb directory of the target. I tired a simple serial project but I got an error:

                            /home/debian/GC_1.pro: error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory
                            14:42:16: Application finished with exit code 127.
                            

                            No surprise in that error because the serial module files are not synced with the target yet so now this time I copied the qt5bbb folder /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb of the host to the /usr/local/qt5bbb directory of the target because that is where the serial module files are located right!

                            Then I tried deploying a simple serial module project and guess what I get the following error:

                            qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
                            This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                            
                            Available platform plugins are: linuxfb, minimal, offscreen, vnc.
                            
                            14:54:10: Remote process crashed.
                            

                            This is where I am stuck at, I wish I knew what I am doing wrong.

                            sierdzioS Offline
                            sierdzioS Offline
                            sierdzio
                            Moderators
                            wrote on last edited by
                            #22

                            @Parvez-Khan said in Cross Compile With/Without Sysroot:

                            So here is the problem you see that message in the last line the new module files are being installed in the directory /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb not in the /usr/local/qt5bbb. This is where things are going sideways, once again I copied the /usr/local/qt5bbb directory from the host to /usr/local/qt5bbb directory of the target.

                            I've checked my old config lines and have a suggestion: use -extprefix to tell configure where make install should go. Short summary of all prefix options:

                            • -hostprefix - this is where Qt will be built (make)
                            • -extprefix - this is where Qt will be installed (make install)
                            • -prefix - this is where Qt will be placed (on target device!)

                            (Z(:^

                            P 1 Reply Last reply
                            3
                            • JKSHJ JKSH

                              @Parvez-Khan said in Cross Compile With/Without Sysroot:

                              Available platform plugins are: linuxfb, minimal, offscreen, vnc.
                              

                              ...

                              Does it give any insights to what is going on?

                              Yes it does.

                              Your copy of Qt is looking for the "eglfs" GUI plugin, but the higher-level GUI plugins were not built

                              • Desktop Linux machines tend to use the "xcb" or "wayland" plugins
                              • Embedded devices often use the "eglfs" plugin

                              However, you don't have any of these; you only have the "linuxfb", "minimal", "offscreen", and "vnc" plugins.

                              The plugins were not built because the sysroot GUI libraries were not found when you configured Qt. (You can check the configure.summary file to see what was as wasn't available)

                              Then I tried deploying a simple serial module project and guess what I get the following error

                              Does your project need a GUI? If not, build a Console application instead of a GUI application. That way, it you don't need the GUI plugins.

                              P Offline
                              P Offline
                              Parvez Khan
                              wrote on last edited by
                              #23

                              @JKSH Thank you for explaining, can you tell what modification I have to made in my configure command to install eglfs plugin?

                              1 Reply Last reply
                              0
                              • sierdzioS sierdzio

                                @Parvez-Khan said in Cross Compile With/Without Sysroot:

                                So here is the problem you see that message in the last line the new module files are being installed in the directory /home/khan/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf/usr/local/qt5bbb not in the /usr/local/qt5bbb. This is where things are going sideways, once again I copied the /usr/local/qt5bbb directory from the host to /usr/local/qt5bbb directory of the target.

                                I've checked my old config lines and have a suggestion: use -extprefix to tell configure where make install should go. Short summary of all prefix options:

                                • -hostprefix - this is where Qt will be built (make)
                                • -extprefix - this is where Qt will be installed (make install)
                                • -prefix - this is where Qt will be placed (on target device!)
                                P Offline
                                P Offline
                                Parvez Khan
                                wrote on last edited by
                                #24

                                @sierdzio I have tried using -extprefix. I entered the following command:

                                ./configure -platform linux-g++ -release -device linux-beagleboard-g++ -sysroot /usr/local/linaro/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -prefix ~/prefix/Qt5BBB -extprefix ~/extprefix/Qt5BBB -hostprefix ~/hostprefix/Qt5BBB -device-option CROSS_COMPILE=/usr/local/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -nomake tests -nomake examples -no-opengl -opensource -confirm-license -reduce-exports -make libs 
                                

                                I have provided a separate folders for each one of the prefix, after compiling QT, compiled the serial port module and then copied the folder to target but still no luck, I am still getting the following error:

                                /home/debian//GC_1.pro: error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory
                                12:58:26: Application finished with exit code 127.
                                

                                This is one of the stubborn problem I have ever experienced. It just don't go away no matter what I do.

                                1 Reply Last reply
                                0
                                • sierdzioS Offline
                                  sierdzioS Offline
                                  sierdzio
                                  Moderators
                                  wrote on last edited by
                                  #25

                                  Why do you compile serial port module later? Just include it in your Qt folder and it will build together with the whole package, like any other module does.

                                  (Z(:^

                                  P 1 Reply Last reply
                                  1
                                  • sierdzioS sierdzio

                                    Why do you compile serial port module later? Just include it in your Qt folder and it will build together with the whole package, like any other module does.

                                    P Offline
                                    P Offline
                                    Parvez Khan
                                    wrote on last edited by
                                    #26

                                    @sierdzio sierdzio, do I have to include that in the configure command?

                                    I am building the QT by going into base folder, are you saying that I should be doing that outside the base folder and it will compile all modules?

                                    JKSHJ sierdzioS 2 Replies Last reply
                                    0
                                    • P Parvez Khan

                                      @sierdzio sierdzio, do I have to include that in the configure command?

                                      I am building the QT by going into base folder, are you saying that I should be doing that outside the base folder and it will compile all modules?

                                      JKSHJ Offline
                                      JKSHJ Offline
                                      JKSH
                                      Moderators
                                      wrote on last edited by JKSH
                                      #27

                                      @Parvez-Khan said in Cross Compile With/Without Sysroot:

                                      Thank you for explaining, can you tell what modification I have to made in my configure command to install eglfs plugin?

                                      It's not a configuration setting. You must make sure that the EGL libraries are installed before you run configure.

                                      After you run configure, inspect the summary file. It will tell you which features are enabled and which are disabled.

                                      I am building the QT by going into base folder, are you saying that I should be doing that outside the base folder and it will compile all modules?

                                      You should run configure in the directory above qtbase. And yes, that will compile all modules.

                                      (Note: You should delete all files that were generated from your previous configuration and build before you proceed)

                                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                      1 Reply Last reply
                                      1
                                      • P Parvez Khan

                                        @sierdzio sierdzio, do I have to include that in the configure command?

                                        I am building the QT by going into base folder, are you saying that I should be doing that outside the base folder and it will compile all modules?

                                        sierdzioS Offline
                                        sierdzioS Offline
                                        sierdzio
                                        Moderators
                                        wrote on last edited by
                                        #28

                                        @Parvez-Khan said in Cross Compile With/Without Sysroot:

                                        @sierdzio sierdzio, do I have to include that in the configure command?

                                        I am building the QT by going into base folder, are you saying that I should be doing that outside the base folder and it will compile all modules?

                                        Of course! Running configure Qt from within qtbase folder is not officially supported! You should always run configure from main directory of Qt source code, where all modules reside.

                                        (Z(:^

                                        P 1 Reply Last reply
                                        1
                                        • sierdzioS sierdzio

                                          @Parvez-Khan said in Cross Compile With/Without Sysroot:

                                          @sierdzio sierdzio, do I have to include that in the configure command?

                                          I am building the QT by going into base folder, are you saying that I should be doing that outside the base folder and it will compile all modules?

                                          Of course! Running configure Qt from within qtbase folder is not officially supported! You should always run configure from main directory of Qt source code, where all modules reside.

                                          P Offline
                                          P Offline
                                          Parvez Khan
                                          wrote on last edited by Parvez Khan
                                          #29

                                          @sierdzio @JKSH I think I have found the problem but I don't know how to fix it.

                                          So this time I compiled all the modules and kept 3 separate folders for prefix, extprefix, and hostprefix using the following configure command:

                                          ./configure -platform linux-g++ -release -device linux-beagleboard-g++ -sysroot ~/qt5.12.2/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -prefix ~/qt5.12.2/prefix/Qt5BBB -extprefix ~/qt5.12.2/extprefix/Qt5BBB -hostprefix ~/qt5.12.2/hostprefix/Qt5BBB -device-option CROSS_COMPILE=~/qt5.12.2/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -nomake tests -nomake examples -no-opengl -opensource -confirm-license -reduce-exports -make libs
                                          

                                          After compilation completes there are only two sub folders(i.e extprefix and hostprefix) created in the ~/qt5.12.2 directory, it does not create a folder for prefix.

                                          When I opened the library folder of extprefix I found that all the serial library files are present:
                                          Screenshot from 2021-09-11 15-08-32.png

                                          and here is a picture of the hostprefix library folder you see there are in fact no serial library files that is why the Qt creator is throwing the "no such file or directory" error while running a project.
                                          Screenshot from 2021-09-11 15-10-41.png

                                          Also there is no qmake file in the bin folder of extprefix:
                                          Screenshot from 2021-09-11 15-44-05.png
                                          This is happening after compiling Qt from its source code directory, there was absolutely no errors during compilation process. I think there is in fact a problem or bug hidden some where.

                                          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