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 5.9k 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 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 Online
      jsulmJ Online
      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 Online
          jsulmJ Online
          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 Online
              jsulmJ Online
              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 Online
                  jsulmJ Online
                  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