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. Compile QT 5.8 to cross-compile Beaglebone
Forum Updated to NodeBB v4.3 + New Features

Compile QT 5.8 to cross-compile Beaglebone

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
53 Posts 5 Posters 31.5k Views 3 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #22

    This is the command that I used to configure Qt for BBB. Obviously, you'll need to change some pathnames, but it might work better than what you're doing now.

    opt/Qt/5.8/Src/qtbase/configure -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -release -device linux-beagleboard-g++ \
     -sysroot /opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.02-arm-linux-gnueabihf/ \
     -prefix /opt/QtForBBB/ \
     -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
     -qt-xcb \
     -nomake tests -nomake examples -no-opengl
    
    A 2 Replies Last reply
    1
    • mzimmersM mzimmers

      This is the command that I used to configure Qt for BBB. Obviously, you'll need to change some pathnames, but it might work better than what you're doing now.

      opt/Qt/5.8/Src/qtbase/configure -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -release -device linux-beagleboard-g++ \
       -sysroot /opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.02-arm-linux-gnueabihf/ \
       -prefix /opt/QtForBBB/ \
       -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
       -qt-xcb \
       -nomake tests -nomake examples -no-opengl
      
      A Offline
      A Offline
      Andrey Shmelew
      wrote on last edited by
      #23

      @mzimmers

      ok, i see you are using Linux host machine.
      Where to download linaro toolchain?

      jsulmJ 1 Reply Last reply
      0
      • A Andrey Shmelew

        @mzimmers

        ok, i see you are using Linux host machine.
        Where to download linaro toolchain?

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

        @Andrey-Shmelew

        https://www.linaro.org/downloads/

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

        1 Reply Last reply
        1
        • mzimmersM mzimmers

          This is the command that I used to configure Qt for BBB. Obviously, you'll need to change some pathnames, but it might work better than what you're doing now.

          opt/Qt/5.8/Src/qtbase/configure -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -release -device linux-beagleboard-g++ \
           -sysroot /opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.02-arm-linux-gnueabihf/ \
           -prefix /opt/QtForBBB/ \
           -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
           -qt-xcb \
           -nomake tests -nomake examples -no-opengl
          
          A Offline
          A Offline
          Andrey Shmelew
          wrote on last edited by Andrey Shmelew
          #25

          @mzimmers
          i Cross Compiled Qt 5.8, so now when i try do deploy, and i've got an errors:

          /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5PrintSupport.so.5: no version information available (required by /usr/test/untitled2)
          /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Script.so.5: no version information available (required by /usr/test/untitled2)
          /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: no version information available (required by /usr/test/untitled2)
          /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5: no version information available (required by /usr/test/untitled2)
          /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5: no version information available (required by /usr/test/untitled2)
          /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by /usr/test/untitled2)
          libEGL warning: DRI3: Screen seems not DRI3 capable
          libEGL warning: DRI2: failed to authenticate
          /usr/test/untitled2: relocation error: /usr/test/untitled2: symbol _ZN9QDateTimeC1EOS_, version Qt_5 not defined in file libQt5Core.so.5 with link time reference
          Application finished with exit code 127.
          

          Help...?

          jsulmJ 1 Reply Last reply
          0
          • A Andrey Shmelew

            @mzimmers
            i Cross Compiled Qt 5.8, so now when i try do deploy, and i've got an errors:

            /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5PrintSupport.so.5: no version information available (required by /usr/test/untitled2)
            /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Script.so.5: no version information available (required by /usr/test/untitled2)
            /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: no version information available (required by /usr/test/untitled2)
            /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5: no version information available (required by /usr/test/untitled2)
            /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5: no version information available (required by /usr/test/untitled2)
            /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by /usr/test/untitled2)
            libEGL warning: DRI3: Screen seems not DRI3 capable
            libEGL warning: DRI2: failed to authenticate
            /usr/test/untitled2: relocation error: /usr/test/untitled2: symbol _ZN9QDateTimeC1EOS_, version Qt_5 not defined in file libQt5Core.so.5 with link time reference
            Application finished with exit code 127.
            

            Help...?

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

            @Andrey-Shmelew How do you deploy?
            And I guess you get this errors when you try to start your app on the target device, right?
            Do the Qt libraries /usr/lib/arm-linux-gnueabihf/libQt5* have the same version number as the cross compiled Qt (5.8)?
            To me it looks like you're using a different Qt version on the target device.
            See http://doc.qt.io/qt-5/linux-deployment.html for deployment to a Linux system.

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

            A 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Andrey-Shmelew How do you deploy?
              And I guess you get this errors when you try to start your app on the target device, right?
              Do the Qt libraries /usr/lib/arm-linux-gnueabihf/libQt5* have the same version number as the cross compiled Qt (5.8)?
              To me it looks like you're using a different Qt version on the target device.
              See http://doc.qt.io/qt-5/linux-deployment.html for deployment to a Linux system.

              A Offline
              A Offline
              Andrey Shmelew
              wrote on last edited by Andrey Shmelew
              #27

              @jsulm said in Compile QT 5.8 to cross-compile Beaglebone:

              And I guess you get this errors when you try to start your app on the target device, right?

              absolutely!

              Do the Qt libraries /usr/lib/arm-linux-gnueabihf/libQt5* have the same version number as the cross compiled Qt (5.8)?

              No, they have 5.3.2 version number.

              if i replace libQt5SerialPort.so.5 (version 5.3.2) by libQt5SerialPort.so.5 (version 5.8.0); i've got errors:

              /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5)
              /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5)
              /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5)
              
              jsulmJ 1 Reply Last reply
              0
              • A Andrey Shmelew

                @jsulm said in Compile QT 5.8 to cross-compile Beaglebone:

                And I guess you get this errors when you try to start your app on the target device, right?

                absolutely!

                Do the Qt libraries /usr/lib/arm-linux-gnueabihf/libQt5* have the same version number as the cross compiled Qt (5.8)?

                No, they have 5.3.2 version number.

                if i replace libQt5SerialPort.so.5 (version 5.3.2) by libQt5SerialPort.so.5 (version 5.8.0); i've got errors:

                /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5)
                /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5)
                /usr/test/untitled2: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5)
                
                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by jsulm
                #28

                @Andrey-Shmelew If you replace then replace all used libraries not just one of them!
                And actually you should NOT replace system libraries as other applications could depend on them!
                Instead deploy your app together with needed libraries as described in the link I posted before.

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

                A 1 Reply Last reply
                2
                • jsulmJ jsulm

                  @Andrey-Shmelew If you replace then replace all used libraries not just one of them!
                  And actually you should NOT replace system libraries as other applications could depend on them!
                  Instead deploy your app together with needed libraries as described in the link I posted before.

                  A Offline
                  A Offline
                  Andrey Shmelew
                  wrote on last edited by
                  #29

                  @jsulm

                  thanks for the link.

                  probably i should paste all of needed libraries to separate folder (for example "/usr/lib/my5-8libs")

                  and then somehow to link my application to these libraries?

                  jsulmJ 1 Reply Last reply
                  0
                  • A Andrey Shmelew

                    @jsulm

                    thanks for the link.

                    probably i should paste all of needed libraries to separate folder (for example "/usr/lib/my5-8libs")

                    and then somehow to link my application to these libraries?

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

                    @Andrey-Shmelew You can put the libs into a separate folder, but you should use /usr/local/lib/... not /usr/lib
                    But then you either need to tell the system where to find them using LD_LIBRARY_PATH (described in the link I posted), or use RPATH to set the path to the libs in your executable, see https://en.wikipedia.org/wiki/Rpath
                    Using /usr/local/lib probably does not require LD_LIBRARY_PATH nor RPATH, but any other locations not searched by the OS by default do.

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

                    1 Reply Last reply
                    2
                    • A Offline
                      A Offline
                      Andrey Shmelew
                      wrote on last edited by Andrey Shmelew
                      #31

                      what 's the problem might be here when i start an application:

                      This application failed to start because it could not find or load the Qt platform plugin "xcb"
                      in "".
                      
                      Reinstalling the application may fix this problem.
                      Aborted
                      

                      it came when i uploaded new libraries 5.8.0 to /usr/lib/new5dot8libs/
                      and entered commands:

                      LD_LIBRARY_PATH=/usr/lib/new5dot8libs
                      export LD_LIBRARY_PATH
                      
                      mzimmersM 1 Reply Last reply
                      0
                      • A Andrey Shmelew

                        what 's the problem might be here when i start an application:

                        This application failed to start because it could not find or load the Qt platform plugin "xcb"
                        in "".
                        
                        Reinstalling the application may fix this problem.
                        Aborted
                        

                        it came when i uploaded new libraries 5.8.0 to /usr/lib/new5dot8libs/
                        and entered commands:

                        LD_LIBRARY_PATH=/usr/lib/new5dot8libs
                        export LD_LIBRARY_PATH
                        
                        mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by
                        #32

                        @Andrey-Shmelew something is not right with your path variable. I notice that your command is overwriting (rather than adding to) any existing LD_LIBRARY_PATH variable; is this intentional? One of these methods is more conventional:

                        PATH=$PATH:/new/path
                        PATH=/new/path:$PATH
                        

                        Also, did you put this command in a startup script? I'm not sure the export will survive a system restart.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          Andrey Shmelew
                          wrote on last edited by Andrey Shmelew
                          #33

                          hi! i have absolutely the same trouble:
                          i reproduse it with absolutely minimal qml example
                          When i deploy qt 5.5 application on beaglebone device (arm linux gnueabihf) - then works perfectly
                          When i deploy qt 5.8 - the error appears:

                          QQmlApplicationEngine failed to load component
                          qrc:/main.qml:-1 File not found
                          

                          // this somehow works but the window is blank
                          main.cpp:

                          #include <QGuiApplication>
                          #include <QQuickView>
                          
                          int main(int argc, char *argv[])
                          {
                              QGuiApplication app(argc, argv);
                          
                              QQuickView view;
                              view.setSource(QUrl::fromLocalFile("main.qml"));
                              view.show();
                          
                              return app.exec();
                          }
                          
                          jsulmJ 1 Reply Last reply
                          0
                          • A Andrey Shmelew

                            hi! i have absolutely the same trouble:
                            i reproduse it with absolutely minimal qml example
                            When i deploy qt 5.5 application on beaglebone device (arm linux gnueabihf) - then works perfectly
                            When i deploy qt 5.8 - the error appears:

                            QQmlApplicationEngine failed to load component
                            qrc:/main.qml:-1 File not found
                            

                            // this somehow works but the window is blank
                            main.cpp:

                            #include <QGuiApplication>
                            #include <QQuickView>
                            
                            int main(int argc, char *argv[])
                            {
                                QGuiApplication app(argc, argv);
                            
                                QQuickView view;
                                view.setSource(QUrl::fromLocalFile("main.qml"));
                                view.show();
                            
                                return app.exec();
                            }
                            
                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by jsulm
                            #34

                            @Andrey-Shmelew You're using a relative path:

                            view.setSource(QUrl::fromLocalFile("main.qml"));
                            

                            Depending from where you start your app the file will not be found.
                            You should construct an absolute path at runtime using http://doc.qt.io/qt-5/qcoreapplication.html#applicationDirPath

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

                            A 1 Reply Last reply
                            0
                            • jsulmJ jsulm

                              @Andrey-Shmelew You're using a relative path:

                              view.setSource(QUrl::fromLocalFile("main.qml"));
                              

                              Depending from where you start your app the file will not be found.
                              You should construct an absolute path at runtime using http://doc.qt.io/qt-5/qcoreapplication.html#applicationDirPath

                              A Offline
                              A Offline
                              Andrey Shmelew
                              wrote on last edited by Andrey Shmelew
                              #35

                              @jsulm
                              um, should i make something like this?

                                  QQuickView view;
                                  view.setSource(QUrl::fromLocalFile("C:/qtqml57/main.qml"));
                                  view.show();
                              

                              the output is still

                              file:///C:/qtqml57/main.qml: File not found
                              
                              jsulmJ 1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #36

                                Because that file is located on your Windows machine.

                                If you don't want to put it in a Qt resource, then do as @jsulm suggested: build the path at run time.

                                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
                                1
                                • A Andrey Shmelew

                                  @jsulm
                                  um, should i make something like this?

                                      QQuickView view;
                                      view.setSource(QUrl::fromLocalFile("C:/qtqml57/main.qml"));
                                      view.show();
                                  

                                  the output is still

                                  file:///C:/qtqml57/main.qml: File not found
                                  
                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #37

                                  @Andrey-Shmelew Something like this:

                                  QString path = QCoreApplication::applicationDirPath() + '/' + "main.qml";
                                  QQuickView view;
                                  view.setSource(QUrl::fromLocalFile(path));
                                  view.show();
                                  

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

                                  A 1 Reply Last reply
                                  1
                                  • jsulmJ jsulm

                                    @Andrey-Shmelew Something like this:

                                    QString path = QCoreApplication::applicationDirPath() + '/' + "main.qml";
                                    QQuickView view;
                                    view.setSource(QUrl::fromLocalFile(path));
                                    view.show();
                                    
                                    A Offline
                                    A Offline
                                    Andrey Shmelew
                                    wrote on last edited by Andrey Shmelew
                                    #38

                                    @jsulm
                                    thanks, but it don't works for me

                                    file:///usr/main.qml: File not found
                                    

                                    note that when i deploy with qt 5.5 kit it enables to deploy without any path stuff

                                    so if i upload main.qml to beaglebone's /usr/ folder then i get :

                                    QQuickView only supports loading of root objects that derive from QQuickItem. 
                                    
                                    If your example is using QML 2, (such as qmlscene) and the .qml file you 
                                    loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur. 
                                    
                                    To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the 
                                    QDeclarativeView class in the Qt Quick 1 module.
                                    
                                    jsulmJ 1 Reply Last reply
                                    0
                                    • A Andrey Shmelew

                                      @jsulm
                                      thanks, but it don't works for me

                                      file:///usr/main.qml: File not found
                                      

                                      note that when i deploy with qt 5.5 kit it enables to deploy without any path stuff

                                      so if i upload main.qml to beaglebone's /usr/ folder then i get :

                                      QQuickView only supports loading of root objects that derive from QQuickItem. 
                                      
                                      If your example is using QML 2, (such as qmlscene) and the .qml file you 
                                      loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur. 
                                      
                                      To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the 
                                      QDeclarativeView class in the Qt Quick 1 module.
                                      
                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #39

                                      @Andrey-Shmelew "/usr"?!
                                      Where is you app located?

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

                                      A 1 Reply Last reply
                                      0
                                      • jsulmJ jsulm

                                        @Andrey-Shmelew "/usr"?!
                                        Where is you app located?

                                        A Offline
                                        A Offline
                                        Andrey Shmelew
                                        wrote on last edited by Andrey Shmelew
                                        #40

                                        @jsulm
                                        it is located in beaglebone's /usr folder when deployed.

                                        When i develop -main.qml is located on windows C:/qtqml57/main.qml ( qtqml57 is qt 5 project folder)

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • A Andrey Shmelew

                                          @jsulm
                                          it is located in beaglebone's /usr folder when deployed.

                                          When i develop -main.qml is located on windows C:/qtqml57/main.qml ( qtqml57 is qt 5 project folder)

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

                                          @Andrey-Shmelew Quite unusual location.
                                          Can you describe how the layout of your app is?
                                          Is it like this:

                                          /usr/YOUR_APP_EXECUTABLE
                                          /usr/main.qml
                                          

                                          ?

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

                                          A 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