This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiling Qt 4.6 for the AM335x-evm-sk.

Hi,

I try to compile Qt 4.6 for of the AM335x-evm-sk and put it into the base-rootfs.

I installed the AMSDK to:

/home/user/ti-sdk-am335x-evm-06.00.00.00

I copied the rootfs to:

/home/user/filesystem/base-rootfs

For the Qt compilation I follow these instructions:
http://processors.wiki.ti.com/index.php/Building_Qt

After unpacking Qt I set the PATH and clear QMAKESPEC.

export QMAKESPEC=""
export PATH=/home/user/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/:$PATH

The next step is preparing the configuration with the following commands:

cp -R mkspecs/qws/linux-arm-g++/ mkspecs/qws/linux-am335x-g++/

My mkspecs/qws/linux-am335x-g++/qmake.conf looks like this:

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

QMAKE_CFLAGS_RELEASE =   -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

# modifications to g++.conf
QMAKE_CC                = arm-linux-gnueabihf-gcc
QMAKE_CXX               = arm-linux-gnueabihf-g++
QMAKE_LINK              = arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++

# modifications to linux.conf
QMAKE_AR                = arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
QMAKE_STRIP             = arm-linux-gnueabihf-strip

load(qt_config)

The configure gave me some errors, e.g. 'system byte order'.

This the configure call I use:

./configure -prefix /home/user/filesystem/base-rootfs/usr/lib -embedded arm -opensource -confirm-license -platform qws/linux-x86_64-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast 

And this the output of configure:

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


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...
g++ -c -o project.o -pipe -m64 -m64 -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/include -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  project.cpp
...
...
...
g++ -c -o qxmlstream.o -pipe -m64 -m64 -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/include -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/xml/qxmlstream.cpp
g++ -c -o qxmlutils.o -pipe -m64 -m64 -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/include -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/user/qt-46/qt-everywhere-opensource-src-4.6.2/src/corelib/xml/qxmlutils.cpp
g++ -o "/home/user/qt-46/qt-everywhere-opensource-src-4.6.2/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_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.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 qfsfileengine_unix.o qfsfileengine_iterator_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 qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o  

The target system byte order could not be detected!
Turn on verbose messaging (-v) to see the final report.
You can use the -little-endian or -big-endian switch to
./configure to continue.

So I wonder what I did wrong.

Any help is welcome
Falk

  • Have you tried sourcing the environment-setup file located in the SDK's linux-devkit directory. Besides configuring the compiler's path it also sets up your environment so that it can cross compile applications.

  • Hi,

    thank you for your answer. But this didn't help. Currently I am able to compile Qt 4.8.5 with the steps above, except my mkspecs/qws/linux-am335x-g++/qmake.conf looks like this:

    #
    # qmake configuration for building with arm-linux-g++
    #
    
    include(../../common/linux.conf)
    include(../../common/gcc-base-unix.conf)
    include(../../common/g++-unix.conf)
    include(../../common/qws.conf)
    
    #QMAKE_CFLAGS +=   -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    #QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    
    # modifications to g++.conf
    QMAKE_CC                = arm-linux-gnueabihf-gcc
    QMAKE_CXX               = arm-linux-gnueabihf-g++
    QMAKE_LINK              = arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++
    
    # modifications to linux.conf
    QMAKE_AR                = arm-linux-gnueabihf-ar cqs
    QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
    QMAKE_STRIP             = arm-linux-gnueabihf-strip
    
    load(qt_config)

    So I have to comment or delete the QMAKE_CFLAGS_RELEASE and QMAKE_CXXFLAGS_RELEASE flags.

    But when I try to compile with sourcing the ti-sdk-am335x-evm-06.00.00.00/linux-devkit/environment-setup, I only get the following erros from the configure script.

    configure:

    ./configure -v -prefix /home/user/filesystem/base-rootfs/usr/lib -embedded arm -opensource -confirm-license -platform qws/linux-x86_64-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -make libs -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -no-pch -no-libmng -no-sql-sqlite -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite2 -no-pch -no-sql-db2 -no-sql-oci -no-sql-tds -no-freetype -no-dbus -webkit -fast

    configure output:.

    Determining system architecture... (Linux:3.5.0-40-generic:x86_64)
        64-bit AMD 80x86 (x86_64)
        'arm' is supported
        'x86_64' is supported
    System architecture: 'arm'
    Host architecture: 'x86_64'
    Symbol visibility control 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...
    arm-linux-gnueabihf-g++ -c -o project.o -pipe -m64 -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/home/user/qt-test/qt-everywhere-opensource-src-4.8.5/include -I/home/user/qt-test/qt-everywhere-opensource-src-4.8.5/include/QtCore -I/home/user/qt-test/qt-everywhere-opensource-src-4.8.5/src/corelib/global -I/home/user/qt-test/qt-everywhere-opensource-src-4.8.5/src/corelib/xml -I/home/user/qt-test/qt-everywhere-opensource-src-4.8.5/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/user/qt-test/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED  project.cpp
    arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-m64’
    make: *** [project.o] Error 1

    I get this error on both versions of Qt (4.8.5 and Qt 4.6.2).

    Best regards
    Falk