Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Developing with Ubuntu Qt Creator ToolChain for Angstrom Beaglebone (Arm Cortex-a8)

Developing with Ubuntu Qt Creator ToolChain for Angstrom Beaglebone (Arm Cortex-a8)

Scheduled Pinned Locked Moved Mobile and Embedded
24 Posts 3 Posters 33.1k Views
  • 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.
  • B Offline
    B Offline
    blaroche
    wrote on 13 Oct 2012, 01:31 last edited by
    #9

    now its time to start cross compiling Qt.

    first goal is to just get a console based 'hello world' application on the target. so, not worried about gui or touchscreen features. you may have to come back to cross compile Qt later to add support for those. save those battles for another day.

    go to the directory you extract Qt.
    make a backup copy of the following file, and then edit the original.
    $qtsource/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf

    notice things like the following:
    QMAKE_CC = arm-angstrom-linux-gnueabi-gcc
    QMAKE_CXX = arm-angstrom-linux-gnueabi-g++
    QMAKE_LINK = arm-angstrom-linux-gnueabi-g++
    QMAKE_LINK_SHLIB = arm-angstrom-linux-gnueabi-g++
    QMAKE_AR = arm-angstrom-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = arm-angstrom-linux-gnueabi-objcopy
    QMAKE_STRIP = arm-angstrom-linux-gnueabi-strip

    make sure 'arm-angstrom-linux-gnueabi-*' matches what you have installed for your toolchain. edit if needed.

    configure Qt with the following in the root of the extracted Qt source.

    @
    ./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -host-big-endian -prefix /usr/local/beaglebone/qt4.8-arm -no-cups -no-accessibility -reduce-relocations -no-nas-sound -no-sm -no-nis -qt-libjpeg -qt-libpng -qt-zlib -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-pch -no-dbus -no-glib -no-phonon -no-phonon-backend -no-webkit -no-multimedia -no-audio-backend -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations -no-qt3support -exceptions -no-fast
    @
    that is a configuration that worked for me in the past. let me know if you get errors.
    pay special attention to:
    -xplatform qws/linux-arm-gnueabi-g++
    and
    -prefix /usr/local/beaglebone/qt4.8-arm

    xplatform tells configure which qmake.conf you want to use, the one you edited above.
    prefix tells configure where you want Qt libs installed on your desktop, this will be the same directory you will copy Qt libs to on your target.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      blaroche
      wrote on 13 Oct 2012, 01:37 last edited by
      #10

      oh. almost forgot.
      after you run the configure command successully, then you need to make and install

      type:
      make
      wait a bit
      then type:
      sudo make install

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NuckNuck
        wrote on 13 Oct 2012, 01:39 last edited by
        #11

        I got up to the configure part and these are the last few lines I got in error:

                   @  from /home/xenland/qt-everywhere-opensource-src-4.8.3/src/corelib/io/qfilesystementry.cpp:46:
        

        /home/xenland/qt-everywhere-opensource-src-4.8.3/include/QtCore/private/../../../src/corelib/io/qfilesystemmetadata_p.h:228: error: expected ',' or '...' before '&' token
        /home/xenland/qt-everywhere-opensource-src-4.8.3/include/QtCore/private/../../../src/corelib/io/qfilesystemmetadata_p.h:228: error: ISO C++ forbids declaration of 'QT_DIRENT' with no type
        make: *** [qfilesystementry.o] Error 1@

        1 Reply Last reply
        0
        • N Offline
          N Offline
          NuckNuck
          wrote on 13 Oct 2012, 02:02 last edited by
          #12

          Updates: I logged in as Sudo -s and got a different error similar to "this one":http://stackoverflow.com/questions/8168950/cross-compiling-c-project-relocations-in-generic-elf-em-3 wit hthe EF 50's errors

          So I did the export thing wit hthe correct file paths and then ran the ./configure --etc -etc again and now I get the same error except it looks cleaner in text style this time like the following...

          @
          Creating qmake. Please wait...
          /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++ -o "/home/xenland/qt-everywhere-opensource-src-4.8.3/bin/qmake" project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o gbuild.o qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o qfilesystementry.o qfilesystemengine_unix.o qfilesystemengine.o qfilesystemiterator_unix.o qfsfileengine_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o
          qfilesystementry.o: file not recognized: File format not recognized
          collect2: ld returned 1 exit status
          make: *** [/home/xenland/qt-everywhere-opensource-src-4.8.3/bin/qmake] Error 1
          root@000000000:~/qt-everywhere-opensource-src-4.8.3#
          @

          1 Reply Last reply
          0
          • B Offline
            B Offline
            blaroche
            wrote on 13 Oct 2012, 02:12 last edited by
            #13

            you don't need sudo for configrue and make.

            let me run thru the steps myself, maybe i missed a step. i was just using bits of notes i had from the past.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              blaroche
              wrote on 13 Oct 2012, 02:42 last edited by
              #14

              ok. all was fine for me. i'm using ubuntu (32 bit), same qt source and toolchain as you. so i prolly didn't explain as step that good.

              1. source your toolchain env file:
                source /usr/local/angstrom/arm/environment-setup
              2. confirm arm binaries are in your PATH env. from any directory type:
                arm-angstrom and hit tab a few times. auto complete should show you a bunch file files named arm-angstrom-linux-gnueabi-something
              3. setup your mkspecs. delete everything in the following file:
                /home/xenland/qt-everywhere-opensource-src-4.8.3/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf

              copy in the following:
              @#

              qmake configuration for building with arm-none-linux-gnueabi-g++

              include(../../common/linux.conf)
              include(../../common/gcc-base-unix.conf)
              include(../../common/g++-unix.conf)
              include(../../common/qws.conf)

              modifications to g++.conf

              QMAKE_CC = arm-angstrom-linux-gnueabi-gcc
              QMAKE_CXX = arm-angstrom-linux-gnueabi-g++
              QMAKE_LINK = arm-angstrom-linux-gnueabi-g++
              QMAKE_LINK_SHLIB = arm-angstrom-linux-gnueabi-g++

              modifications to linux.conf

              QMAKE_AR = arm-angstrom-linux-gnueabi-ar cqs
              QMAKE_OBJCOPY = arm-angstrom-linux-gnueabi-objcopy
              QMAKE_STRIP = arm-angstrom-linux-gnueabi-strip

              load(qt_config)

              @

              1. cd to /home/xenland/qt-everywhere-opensource-src-4.8.3/ and run the following command:
                @./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -host-big-endian -prefix /usr/local/beaglebone/qt4.8-arm -no-cups -no-accessibility -reduce-relocations -no-nas-sound -no-sm -no-nis -qt-libjpeg -qt-libpng -qt-zlib -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-pch -no-dbus -no-glib -no-phonon -no-phonon-backend -no-webkit -no-multimedia -no-audio-backend -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations -no-qt3support -exceptions -no-fast

              @

              i usually just copy the configure command into a file called config in the source directory, and chmod 755, and run the file ./config

              hopefully you don't get any errors, and then you can run:
              make
              if you have a mutiple core cpu, you can run: make -j2, or make -j4 to speed things up.

              then
              sudo make install

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JKSH
                Moderators
                wrote on 13 Oct 2012, 02:45 last edited by
                #15

                [quote author="blaroche" date="1350091911"]
                @
                ./configure ... -embedded arm -little-endian -host-big-endian ...
                @
                [/quote]

                [quote author="NuckNuck" date="1350093758"]
                @
                qfilesystementry.o: file not recognized: File format not recognized
                @
                [/quote]
                ...isn't x86_64 little-endian?

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

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  blaroche
                  wrote on 13 Oct 2012, 02:59 last edited by
                  #16

                  [quote author="NuckNuck" date="1350093758"]

                  ...isn't x86_64 little-endian?[/quote]
                  i've never tried on a 64bit machine, good suggestion, thank you.
                  try this configure.
                  but first, cleanup. run
                  make confclean

                  ./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -host-little-endian -prefix /usr/local/beaglebone/qt4.8-arm -no-cups -no-accessibility -reduce-relocations -no-nas-sound -no-sm -no-nis -qt-libjpeg -qt-libpng -qt-zlib -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-pch -no-dbus -no-glib -no-phonon -no-phonon-backend -no-webkit -no-multimedia -no-audio-backend -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations -no-qt3support -exceptions -no-fast

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    NuckNuck
                    wrote on 13 Oct 2012, 05:41 last edited by
                    #17

                    I did * make confclean* which make claimed it couldn't find any target file/config so i just did the ./configure above with the last post that includes the little-endian flag and now I recieve this error, Thanks again for the help I'm excited to get to BeagleBone programming

                    _
                    root@000000000:~/qt-everywhere-opensource-src-4.8.3# ./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -host-big-endian -prefix /usr/local/beaglebone/qt4.8-arm -no-cups -no-accessibility -reduce-relocations -no-nas-sound -no-sm -no-nis -qt-libjpeg -qt-libpng -qt-zlib -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-pch -no-dbus -no-glib -no-phonon -no-phonon-backend -no-webkit -no-multimedia -no-audio-backend -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations -no-qt3support -exceptions -no-fast
                    Determining system architecture... (Linux:3.2.0-32-generic:x86_64)
                    64-bit AMD 80x86 (x86_64)
                    'arm' is supported
                    'x86_64' is supported
                    System architecture: 'arm'
                    Host architecture: 'x86_64'

                    You have not explicitly asked to use pkg-config and are cross-compiling.
                    pkg-config will not be used to automatically query cflag/lib parameters for
                    dependencies

                    Symbol visibility control enabled.
                    Symbolic function binding enabled.

                    This is the Qt for Embedded Linux Open Source Edition.

                    You are licensed to use this software under the terms of
                    the Lesser GNU General Public License (LGPL) versions 2.1.
                    You are also licensed to use this software under the terms of
                    the GNU General Public License (GPL) versions 3.

                    You have already accepted the terms of the license.

                    Creating qmake. Please wait...
                    /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++ -c -o option.o -pipe -m64 -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/home/xenland/qt-everywhere-opensource-src-4.8.3/include -I/home/xenland/qt-everywhere-opensource-src-4.8.3/include/QtCore -I/home/xenland/qt-everywhere-opensource-src-4.8.3/src/corelib/global -I/home/xenland/qt-everywhere-opensource-src-4.8.3/src/corelib/xml -I/home/xenland/qt-everywhere-opensource-src-4.8.3/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/xenland/qt-everywhere-opensource-src-4.8.3/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED option.cpp
                    cc1plus: error: unrecognized command line option "-m64"
                    make: *** [option.o] Error 1
                    _

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      JKSH
                      Moderators
                      wrote on 13 Oct 2012, 08:24 last edited by
                      #18

                      Hmm... Google suggests that the "-m64" is not supported by these cross-compilers. I don't have a 64-bit machine, so I'm not sure where that is being set.

                      Go to your Qt root folder and call this to find out:
                      @
                      grep m64 *
                      @

                      You might be able to manually remove the flag and continue.

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

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        blaroche
                        wrote on 13 Oct 2012, 13:16 last edited by
                        #19

                        hmm. lets go back and see if we can find a smaller configure that you can build on.

                        see where you get with this one:
                        @./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -host-big-endian -prefix /usr/local/beaglebone/qt4.8-arm @

                        then maybe try this:
                        @./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -prefix /usr/local/beaglebone/qt4.8-arm @

                        i'm with JSKH, i've never cross compiled on 64 bit.

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          blaroche
                          wrote on 13 Oct 2012, 13:25 last edited by
                          #20

                          another one to try...
                          @
                          ./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -prefix /usr/local/beaglebone/qt4.8-arm
                          @

                          1 Reply Last reply
                          0
                          • N Offline
                            N Offline
                            NuckNuck
                            wrote on 13 Oct 2012, 21:33 last edited by
                            #21

                            [quote author="blaroche" date="1350134211"]hmm. lets go back and see if we can find a smaller configure that you can build on.

                            see where you get with this one:
                            @./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -host-big-endian -prefix /usr/local/beaglebone/qt4.8-arm @
                            [/quote]

                            That first configure seems to have done the trick, This was the end result

                            @
                            Qt is now configured for building. Just run 'make'.
                            Once everything is built, you must run 'make install'.
                            Qt will be installed into /usr/local/beaglebone/qt4.8-arm

                            To reconfigure, run 'make confclean' and 'configure'.
                            @

                            So i ran make and recieved the following error

                            @make[1]: arm-none-linux-gnueabi-g++: Command not found
                            make[1]: *** [.obj/release-shared-emb-arm/qabstractanimation.o] Error 127
                            make[1]: Leaving directory `/home/xenland/qt-everywhere-opensource-src-4.8.3/src/corelib'
                            make: *** [sub-corelib-make_default-ordered] Error 2
                            @

                            Its odd that it says its trying to execute arm-none-linux-gnueabi-g++

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              blaroche
                              wrote on 13 Oct 2012, 22:02 last edited by
                              #22

                              check your mkspecs again.
                              look at this file:
                              /home/xenland/qt-everywhere-opensource-src-4.8.3/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf

                              you should see stuff for:
                              arm-angstrom-linux-gnueabi-*
                              not
                              arm-none-linux-gnueabi-*

                              should look like the below:
                              @ #
                              # qmake configuration for building with arm-none-linux-gnueabi-g++
                              #

                              include(../../common/linux.conf)
                              include(../../common/gcc-base-unix.conf)
                              include(../../common/g++-unix.conf)
                              include(../../common/qws.conf)
                               
                              # modifications to g++.conf
                              QMAKE_CC                = arm-angstrom-linux-gnueabi-gcc
                              QMAKE_CXX               = arm-angstrom-linux-gnueabi-g++
                              QMAKE_LINK              = arm-angstrom-linux-gnueabi-g++
                              QMAKE_LINK_SHLIB        = arm-angstrom-linux-gnueabi-g++
                               
                               
                              # modifications to linux.conf
                              QMAKE_AR                = arm-angstrom-linux-gnueabi-ar cqs
                              QMAKE_OBJCOPY           = arm-angstrom-linux-gnueabi-objcopy
                              QMAKE_STRIP             = arm-angstrom-linux-gnueabi-strip
                               
                              load(qt_config)
                              

                              @

                              1 Reply Last reply
                              0
                              • N Offline
                                N Offline
                                NuckNuck
                                wrote on 14 Oct 2012, 01:16 last edited by
                                #23

                                The conf file was saying the arm-none so I changed it to the one you provided and I get relativly the same error take a look:
                                @
                                xenland@000000000:~/qt-everywhere-opensource-src-4.8.3$ make
                                cd src/tools/bootstrap/ && make -f Makefile
                                make[1]: Entering directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/bootstrap' make[1]: Nothing to be done for first'.
                                make[1]: Leaving directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/bootstrap' cd src/tools/moc/ && make -f Makefile make[1]: Entering directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/moc'
                                /home/xenland/qt-everywhere-opensource-src-4.8.3/bin/qmake -spec ../../../mkspecs/qws/linux-x86_64-g++ -o Makefile moc.pro
                                make[1]: Leaving directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/moc' make[1]: Entering directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/moc'
                                make[1]: Nothing to be done for first'. make[1]: Leaving directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/moc'
                                cd src/tools/rcc/ && make -f Makefile
                                make[1]: Entering directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/rcc' make[1]: Nothing to be done for first'.
                                make[1]: Leaving directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/rcc' cd src/tools/uic/ && make -f Makefile make[1]: Entering directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/uic'
                                make[1]: Nothing to be done for first'. make[1]: Leaving directory /home/xenland/qt-everywhere-opensource-src-4.8.3/src/tools/uic'
                                cd src/corelib/ && make -f Makefile
                                make[1]: Entering directory `/home/xenland/qt-everywhere-opensource-src-4.8.3/src/corelib'
                                arm-angstrom-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER="/lib64/ld-linux-x86-64.so.2" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp
                                make[1]: arm-angstrom-linux-gnueabi-g++: Command not found
                                make[1]: *** [.obj/release-shared-emb-arm/qabstractanimation.o] Error 127
                                @

                                1 Reply Last reply
                                0
                                • B Offline
                                  B Offline
                                  blaroche
                                  wrote on 14 Oct 2012, 01:41 last edited by
                                  #24

                                  now looks like the toolchain binaries aren't found in your PATH var.
                                  source the toolchain env file, type:
                                  source /usr/local/angstrom/arm/environment-setup

                                  then type:
                                  arm-angstrom-linux and hit tab a few times and make sure it can find arm-angstrom-linux-gnueabi-g++

                                  see if that gets you further.

                                  1 Reply Last reply
                                  0

                                  18/24

                                  13 Oct 2012, 08:24

                                  • Login

                                  • Login or register to search.
                                  18 out of 24
                                  • First post
                                    18/24
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved