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 setup for TI processor
Forum Updated to NodeBB v4.3 + New Features

Cross compile setup for TI processor

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
20 Posts 3 Posters 6.0k Views 1 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.
  • R Rlkcpo

    OK ill try and be more specific.

    Is it necessary to create an entire hard disk image in order to get what I need? Is the entirety of the device memory (including the entire Linux kernel) required to be cloned, and then transferred to my local machine and use that file as the link to the sysroot in the Qt Kit? Sorry if I am being obtuse. Ive never done this before and Qt documentation on what is required to generate the proper makefiles seems a bit limited.

    Again thanks for responding!

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

    @Rlkcpo What you need is /usr (it contains /usr/include and /usr/lib).
    It is not a file that you need to use to cross compile it is a directory containing all needed stuff like

    ~/sysroot/usr
    

    You then can add the path to the sysroot in QtCreator in your Kit configuration.

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

    1 Reply Last reply
    0
    • Pablo J. RoginaP Pablo J. Rogina

      @Rlkcpo on one hand, you may want to take a look at the support for Qt framework TI is/was? providing for its Sitara product, so at some point TI is aware of Qt :-)
      On the other hand, this post mentions that Keystone devices "... do not have any kind of graphics hardware, display hardware, or multimedia acceleration ...".

      I don't know anything about the device, but if that assertion is (partially)true, the question is why are you interested in using Qt framework? Although Qt is perfect for developing multi-platform non-GUI applications (one source code, several platforms to run it) are you sure Qt is a good fit? Are you porting some application already built using Qt to this device?

      Least but not last, in any event that you know your device is supported somehow by Yocto, you may want to take a look at these posts here and here about integrating Qt/Qt Creator with devices via Yocto.

      R Offline
      R Offline
      Rlkcpo
      wrote on last edited by
      #8

      @Pablo-J.-Rogina said in Cross compile setup for TI processor:

      @Rlkcpo on one hand, you may want to take a look at the support for Qt framework TI is/was? providing for its Sitara product, so at some point TI is aware of Qt :-)
      On the other hand, this post mentions that Keystone devices "... do not have any kind of graphics hardware, display hardware, or multimedia acceleration ...".

      I don't know anything about the device, but if that assertion is (partially)true, the question is why are you interested in using Qt framework? Although Qt is perfect for developing multi-platform non-GUI applications (one source code, several platforms to run it) are you sure Qt is a good fit? Are you porting some application already built using Qt to this device?

      Least but not last, in any event that you know your device is supported somehow by Yocto, you may want to take a look at these posts here and here about integrating Qt/Qt Creator with devices via Yocto.

      Hey Pablo,

      Thanks for the reply. I have looked into the documentation that TI has for Sitara. As they supply all the required files (specifically a qmake.conf file and a /sysroot directory) that are specific to that processor, it doesn't really help me much.

      I have been speaking directly with the reps at TI and they seem as confused as you as to why we would want to put Qt on the keystone ii. Let me just say that Qt is much more powerful then a simple framework to make pretty GUIs. Especially in embedded systems. The overhead is negligible and the speed with which our new developers grasp the concepts is absolutely amazing.

      I might be wrong here but I don't believe Yocto is going to help me either. Im still going to need to create a qmake binary and try to piece together a sysroot directory for my specific processor.

      1 Reply Last reply
      0
      • Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #9

        @Rlkcpo I agree with you, and I'm a great advocate of, using Qt framework for developing non-GUI applications as well. It provides a good set of different modules (i.e. networking, command line parsing, XML processing, etc. etc.) that speed up developing and help maintaining non-GUI applications with C++ for a good set of different platforms.
        Good luck with the remaining work ahead!

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rlkcpo
          wrote on last edited by
          #10

          Ok so I "think" I am making some progress. I think I found what might be considered my devices sysroot thanks to @jsulm in my devices /usr directory. I just copied that entire directory to my local machine and am using it as my sysroot (correct me please if this is wrong).

          I am now ready to create my Qt version and qmake. I ran the configure tool with these options:

          ./configure -xplatform linux-TIarmv7-g++ -opensource -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscxml -skip qtsensors -skip qtspeech -skip qtsvg -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebview -skip qtwinextras -skip qtxmlpatterns -verbose -shared -confirm-license -no-force-asserts -no-feature-accessibility -no-feature-gui -sysroot /scratchnobackup/usr
          

          It creates the binary and this is my output:

          This is the Qt Open Source Edition.
          
          You have already accepted the terms of the Open Source license.
          
          Running configuration tests...
          Done running configuration tests.
          
          Configure summary:
          
          Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
          Building for: linux-TIarmv7-g++ (arm, CPU features: neon)
          Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus no-pkg-config no-gui reduce_exports stl no-widgets
          Build options:
            Mode ................................... release
            Optimize release build for size ........ no
            Building shared libraries .............. yes
            Using C++ standard ..................... C++1z
            Using ccache ........................... no
            Using gold linker ...................... yes
            Using new DTAGS ........................ yes
            Using precompiled headers .............. yes
            Using LTCG ............................. no
            Target compiler supports:
              NEON ................................. yes
            Build parts ............................ libs examples
          Qt modules and options:
            Qt Concurrent .......................... yes
            Qt D-Bus ............................... yes
            Qt D-Bus directly linked to libdbus .... no
            Qt Gui ................................. no
            Qt Network ............................. yes
            Qt Sql ................................. yes
            Qt Testlib ............................. yes
            Qt Widgets ............................. no
            Qt Xml ................................. yes
          Support enabled for:
            Using pkg-config ....................... no
            QML debugging .......................... yes
            udev ................................... no
            Using system zlib ...................... no
          Qt Core:
            DoubleConversion ....................... yes
              Using system DoubleConversion ........ no
            GLib ................................... no
            iconv .................................. yes
            ICU .................................... no
            Logging backends:
              journald ............................. no
              syslog ............................... no
              slog2 ................................ no
            Using system PCRE2 ..................... no
          Qt Network:
            getifaddrs() ........................... yes
            IPv6 ifname ............................ yes
            libproxy ............................... no
            OpenSSL ................................ no
              Qt directly linked to OpenSSL ........ no
            SCTP ................................... no
            Use system proxies ..................... yes
          Qt Gui:
            Accessibility .......................... no
            FreeType ............................... yes
              Using system FreeType ................ no
            HarfBuzz ............................... yes
              Using system HarfBuzz ................ no
            Fontconfig ............................. no
            Image formats:
              GIF .................................. yes
              ICO .................................. yes
              JPEG ................................. yes
                Using system libjpeg ............... no
              PNG .................................. yes
                Using system libpng ................ no
            EGL .................................... no
            OpenVG ................................. no
            OpenGL:
              Desktop OpenGL ....................... no
              OpenGL ES 2.0 ........................ no
              OpenGL ES 3.0 ........................ no
              OpenGL ES 3.1 ........................ no
              OpenGL ES 3.2 ........................ no
            Vulkan ................................. no
            Session Management ..................... yes
          Features used by QPA backends:
            evdev .................................. yes
            libinput ............................... no
            INTEGRITY HID .......................... no
            mtdev .................................. no
            tslib .................................. no
            xkbcommon-evdev ........................ no
          QPA backends:
            DirectFB ............................... no
            EGLFS .................................. no
            LinuxFB ................................ yes
            VNC .................................... yes
            Mir client ............................. no
          Qt Widgets:
            GTK+ ................................... no
            Styles ................................. Fusion Windows
          Qt PrintSupport:
            CUPS ................................... no
          Qt Sql:
            DB2 (IBM) .............................. no
            InterBase .............................. no
            MySql .................................. no
            OCI (Oracle) ........................... no
            ODBC ................................... no
            PostgreSQL ............................. no
            SQLite2 ................................ no
            SQLite ................................. yes
              Using system provided SQLite ......... no
            TDS (Sybase) ........................... no
          Qt SerialBus:
            Socket CAN ............................. yes
            Socket CAN FD .......................... yes
          
          Note: Also available for Linux: linux-clang linux-icc
          
          WARNING: Accessibility disabled. This configuration of Qt is unsupported.
          
          Qt is now configured for building. Just run 'make'.
          Once everything is built, you must run 'make install'.
          Qt will be installed into '/scratchnobackup/usr/usr/local/Qt-5.10.0'.
          
          Prior to reconfiguration, make sure you remove any leftovers from
          the previous build.
          
          

          I then run $make

          arm-linux-gnueabihf-g++ --sysroot=/scratchnobackup/usr --sysroot=/scratchnobackup/usr -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/Qt-5.10.0/lib -o qt    -lpthread 
          /usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/lib/../lib/crt1.o(.text+0x28): error: undefined reference to 'main'
          collect2: error: ld returned 1 exit status
          Makefile:106: recipe for target 'qt' failed
          make: *** [qt] Error 1
          
          

          In the past I have seen this before but it was usually because of the binary wasn't to be used as an executable and forgot the -c linker flag. Thanks in advance for any assistance.

          jsulmJ 1 Reply Last reply
          0
          • R Rlkcpo

            Ok so I "think" I am making some progress. I think I found what might be considered my devices sysroot thanks to @jsulm in my devices /usr directory. I just copied that entire directory to my local machine and am using it as my sysroot (correct me please if this is wrong).

            I am now ready to create my Qt version and qmake. I ran the configure tool with these options:

            ./configure -xplatform linux-TIarmv7-g++ -opensource -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscxml -skip qtsensors -skip qtspeech -skip qtsvg -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebview -skip qtwinextras -skip qtxmlpatterns -verbose -shared -confirm-license -no-force-asserts -no-feature-accessibility -no-feature-gui -sysroot /scratchnobackup/usr
            

            It creates the binary and this is my output:

            This is the Qt Open Source Edition.
            
            You have already accepted the terms of the Open Source license.
            
            Running configuration tests...
            Done running configuration tests.
            
            Configure summary:
            
            Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
            Building for: linux-TIarmv7-g++ (arm, CPU features: neon)
            Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus no-pkg-config no-gui reduce_exports stl no-widgets
            Build options:
              Mode ................................... release
              Optimize release build for size ........ no
              Building shared libraries .............. yes
              Using C++ standard ..................... C++1z
              Using ccache ........................... no
              Using gold linker ...................... yes
              Using new DTAGS ........................ yes
              Using precompiled headers .............. yes
              Using LTCG ............................. no
              Target compiler supports:
                NEON ................................. yes
              Build parts ............................ libs examples
            Qt modules and options:
              Qt Concurrent .......................... yes
              Qt D-Bus ............................... yes
              Qt D-Bus directly linked to libdbus .... no
              Qt Gui ................................. no
              Qt Network ............................. yes
              Qt Sql ................................. yes
              Qt Testlib ............................. yes
              Qt Widgets ............................. no
              Qt Xml ................................. yes
            Support enabled for:
              Using pkg-config ....................... no
              QML debugging .......................... yes
              udev ................................... no
              Using system zlib ...................... no
            Qt Core:
              DoubleConversion ....................... yes
                Using system DoubleConversion ........ no
              GLib ................................... no
              iconv .................................. yes
              ICU .................................... no
              Logging backends:
                journald ............................. no
                syslog ............................... no
                slog2 ................................ no
              Using system PCRE2 ..................... no
            Qt Network:
              getifaddrs() ........................... yes
              IPv6 ifname ............................ yes
              libproxy ............................... no
              OpenSSL ................................ no
                Qt directly linked to OpenSSL ........ no
              SCTP ................................... no
              Use system proxies ..................... yes
            Qt Gui:
              Accessibility .......................... no
              FreeType ............................... yes
                Using system FreeType ................ no
              HarfBuzz ............................... yes
                Using system HarfBuzz ................ no
              Fontconfig ............................. no
              Image formats:
                GIF .................................. yes
                ICO .................................. yes
                JPEG ................................. yes
                  Using system libjpeg ............... no
                PNG .................................. yes
                  Using system libpng ................ no
              EGL .................................... no
              OpenVG ................................. no
              OpenGL:
                Desktop OpenGL ....................... no
                OpenGL ES 2.0 ........................ no
                OpenGL ES 3.0 ........................ no
                OpenGL ES 3.1 ........................ no
                OpenGL ES 3.2 ........................ no
              Vulkan ................................. no
              Session Management ..................... yes
            Features used by QPA backends:
              evdev .................................. yes
              libinput ............................... no
              INTEGRITY HID .......................... no
              mtdev .................................. no
              tslib .................................. no
              xkbcommon-evdev ........................ no
            QPA backends:
              DirectFB ............................... no
              EGLFS .................................. no
              LinuxFB ................................ yes
              VNC .................................... yes
              Mir client ............................. no
            Qt Widgets:
              GTK+ ................................... no
              Styles ................................. Fusion Windows
            Qt PrintSupport:
              CUPS ................................... no
            Qt Sql:
              DB2 (IBM) .............................. no
              InterBase .............................. no
              MySql .................................. no
              OCI (Oracle) ........................... no
              ODBC ................................... no
              PostgreSQL ............................. no
              SQLite2 ................................ no
              SQLite ................................. yes
                Using system provided SQLite ......... no
              TDS (Sybase) ........................... no
            Qt SerialBus:
              Socket CAN ............................. yes
              Socket CAN FD .......................... yes
            
            Note: Also available for Linux: linux-clang linux-icc
            
            WARNING: Accessibility disabled. This configuration of Qt is unsupported.
            
            Qt is now configured for building. Just run 'make'.
            Once everything is built, you must run 'make install'.
            Qt will be installed into '/scratchnobackup/usr/usr/local/Qt-5.10.0'.
            
            Prior to reconfiguration, make sure you remove any leftovers from
            the previous build.
            
            

            I then run $make

            arm-linux-gnueabihf-g++ --sysroot=/scratchnobackup/usr --sysroot=/scratchnobackup/usr -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/Qt-5.10.0/lib -o qt    -lpthread 
            /usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/lib/../lib/crt1.o(.text+0x28): error: undefined reference to 'main'
            collect2: error: ld returned 1 exit status
            Makefile:106: recipe for target 'qt' failed
            make: *** [qt] Error 1
            
            

            In the past I have seen this before but it was usually because of the binary wasn't to be used as an executable and forgot the -c linker flag. Thanks in advance for any assistance.

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

            @Rlkcpo said in Cross compile setup for TI processor:

            -sysroot /scratchnobackup/usr

            remove usr from the sysroot path:

            -sysroot /scratchnobackup
            

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

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rlkcpo
              wrote on last edited by
              #12

              Thanks for the help @jsulm, I really appreciate it.

              Unfortunately that didn't fix it.

              arm-linux-gnueabihf-g++ --sysroot=/scratchnobackup -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/Qt-5.10.0/lib -o qt    -lpthread 
              /usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/lib/../lib/crt1.o(.text+0x28): error: undefined reference to 'main'
              collect2: error: ld returned 1 exit status
              Makefile:106: recipe for target 'qt' failed
              make: *** [qt] Error 1
              
              
              jsulmJ 1 Reply Last reply
              0
              • R Rlkcpo

                Thanks for the help @jsulm, I really appreciate it.

                Unfortunately that didn't fix it.

                arm-linux-gnueabihf-g++ --sysroot=/scratchnobackup -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/Qt-5.10.0/lib -o qt    -lpthread 
                /usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/lib/../lib/crt1.o(.text+0x28): error: undefined reference to 'main'
                collect2: error: ld returned 1 exit status
                Makefile:106: recipe for target 'qt' failed
                make: *** [qt] Error 1
                
                
                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #13

                @Rlkcpo Maybe you should start from a clean source tree (it is better to do out of source builds).

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

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  Rlkcpo
                  wrote on last edited by
                  #14

                  Im not sure what you mean. Are you suggesting I reinstall Qt?

                  jsulmJ 1 Reply Last reply
                  0
                  • R Rlkcpo

                    Im not sure what you mean. Are you suggesting I reinstall Qt?

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

                    @Rlkcpo Not reinstalling Qt. It looks like you did not use out of source builds, so all build artefacts are inside Qt source code tree and can effect later builds. Just unpack Qt source code and try from this clean state.

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

                    1 Reply Last reply
                    2
                    • R Offline
                      R Offline
                      Rlkcpo
                      wrote on last edited by
                      #16

                      I think im following you. Currently my source folder is /scratchnobackup/Qt5.10/5.10.0/Src

                      You want me to move the Src directory outside of the Qt install directory and run configure again correct?

                      jsulmJ 1 Reply Last reply
                      0
                      • R Rlkcpo

                        I think im following you. Currently my source folder is /scratchnobackup/Qt5.10/5.10.0/Src

                        You want me to move the Src directory outside of the Qt install directory and run configure again correct?

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

                        @Rlkcpo No. What I suggest is: delete Src directory and extract Qt sources again.

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

                        1 Reply Last reply
                        1
                        • R Offline
                          R Offline
                          Rlkcpo
                          wrote on last edited by
                          #18

                          I used the online installer. It all installs to the same directory. Ii saw some posts earlier about building Qt from source off of git. Let me see if I can find that again.

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            Rlkcpo
                            wrote on last edited by
                            #19

                            I ran the installer again to try and see if I could just get the sources and if you select Qt and tunnel into that there is a separate sources folder you can select.

                            Im sorry if I ask too many questions about this. I have used Qt in an embedded environment for a while now but I have never had to install it. So all of this is new to me.

                            1 Reply Last reply
                            0
                            • R Offline
                              R Offline
                              Rlkcpo
                              wrote on last edited by
                              #20

                              Ok I installed the source again in a different directory (/scratchnobackup/QtSource/5.10.0/Src)and am still getting the same error.
                              (ran without defining a sysroot, as well as with it defined as /scratchnobackup/usr and just /scratchnobackup)

                              arm-linux-gnueabihf-g++ --sysroot=/scratchnobackup --sysroot=/scratchnobackup -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/Qt-5.10.0/lib -o qt    -lpthread 
                              /usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/lib/../lib/crt1.o(.text+0x28): error: undefined reference to 'main'
                              collect2: error: ld returned 1 exit status
                              Makefile:106: recipe for target 'qt' failed
                              make: *** [qt] Error 1
                              
                              
                              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