How to Cross compiling Qt/X11 for beagleboard?



  • Hi all,
    I have got a beagleboard, I use angstrom for linux platform, I want to port QT 4.6.2 x11 for this board, and I followed http://labs.qt.nokia.com/2009/09/10/cross-compiling-qtx11/
    But I encountered the configuration problems, I can't configure the makefile.

    my environment:
    Ubuntu 10.04
    Scratchbox2 2.0-lta101
    I downloaded the toolchain form http://www.angstrom-distribution.org/toolchains/angstrom-2010.4-test-20100422-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2
    the qt source file form http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.2.tar.gz

    I untar the toolchain to /usr/local/angstrom, the sourced the toolchain environment file.

    Then, followed the http://labs.qt.nokia.com/2009/09/10/cross-compiling-qtx11/ steps.

    use "bitbake beagleboard_demo_image" built the angstrom image, then untar it to a folder, and sb2 init there.

    When I try to configure the makefile, I encountered these error.

    my configure command is sb2 ./configure -arch arm -xplatform qws/linux-arm-g++ -force-pkg-config -v

    Please help me :)



  • error message

    @/home/dc/qt-everywhere-opensource-src-4.6.2$ sb2 ./configure -arch arm -xplatform qws/linux-arm-g++ -force-pkg-config -v

    Which edition of Qt do you want to use ?

    Type 'c' if you want to use the Commercial Edition.
    Type 'o' if you want to use the Open Source Edition.

    o

    Determining system architecture... (Linux:2.6.32-26-generic:arm)
    ARM (arm)
    'arm' is supported
    System architecture: 'arm'

    You have asked to use pkg-config and are cross-compiling.
    Please make sure you have a correctly set-up pkg-config
    environment!

    WARNING: recursive calls to sb2 are not supported (session already exists)
    WARNING: going to execute 'g++ -x c++-header precomp_header.h' in this session
    Precompiled-headers support enabled.
    /home/dc/qt-everywhere-opensource-src-4.6.2/config.tests/unix/fvisibility.test: line 18: sb2 g++: command not found
    Symbol visibility control disabled.

    This is the Qt for Linux/X11 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.

    Type '3' to view the GNU General Public License version 3.
    Type 'L' to view the Lesser GNU General Public License version 2.1.
    Type 'yes' to accept this license offer.
    Type 'no' to decline this license offer.

    Do you accept the terms of either license? yes@



  • @Creating qmake. Please wait...
    rm: cannot remove mkspecs/default': Is a directory ln: creating symbolic linkmkspecs/default/linux-arm-g++': File exists
    make: Nothing to be done for `first'.
    floatmath auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    floatmath disabled.
    mmx auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    mmx disabled.
    3dnow auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    3dnow disabled.
    sse auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    sse disabled.
    sse2 auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    sse2 disabled.
    neon auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    neon disabled.
    zlib auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    zlib disabled.
    libjpeg auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    libjpeg disabled.
    libtiff auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    libtiff disabled.
    libmng auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    libmng disabled.
    libpng auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    libpng disabled.
    DB2 auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    DB2 disabled.
    InterBase auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    InterBase disabled.
    MySQL (thread-safe) auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    MySQL (thread-safe) disabled.
    MySQL (thread-unsafe) auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    MySQL (thread-unsafe) disabled.
    OCI auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    OCI disabled.
    ODBC auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    ODBC disabled.
    iODBC auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    iODBC disabled.
    PostgreSQL auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    PostgreSQL disabled.
    SQLite2 auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    SQLite2 disabled.
    unknown SQL driver: sqlite_symbian
    TDS auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    TDS disabled.
    NIS auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    NIS disabled.
    Cups auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    Cups disabled.
    POSIX iconv auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    POSIX iconv disabled.
    GNU libiconv auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    GNU libiconv disabled.
    D-Bus auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    D-Bus disabled.
    EGL (EGL/egl.h) auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    EGL (EGL/egl.h) disabled.
    EGL (GLES/egl.h) auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    EGL (GLES/egl.h) disabled.
    Glib auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    Glib disabled.
    Detecting broken X11 headers... (/home/dc/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-arm-g++ yes /home/dc/qt-everywhere-opensource-src-4.6.2 /home/dc/qt-everywhere-opensource-src-4.6.2)
    X11 headers look good.
    XLib auto-detection... ()
    mmap: No such device or address
    make: *** No targets specified and no makefile found. Stop.
    XLib disabled.
    Basic XLib functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/dc/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-arm-g++. @

    If I don't add sb2 in front of configure, it will error as @/lib/ld-linux.so.3: No such file or directory@



  • the toolchain environment is
    @export SDK_PATH=/usr/local/angstrom/arm
    export TARGET_SYS=arm-angstrom-linux-gnueabi
    export PATH=$SDK_PATH/bin:$PATH
    export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH
    export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS
    export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS
    export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig
    export CONFIG_SITE=$SDK_PATH/site-config
    alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH//etc/opkg-sdk.conf -o $SDK_PATH"
    alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS/etc/opkg.conf -o $SDK_PATH/$TARGET_SYS"
    export OE_QMAKE_CC=arm-angstrom-linux-gnueabi-gcc
    export OE_QMAKE_CXX=arm-angstrom-linux-gnueabi-g++
    export OE_QMAKE_LINK=arm-angstrom-linux-gnueabi-g++
    export OE_QMAKE_LIBDIR_QT=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/lib
    export OE_QMAKE_INCDIR_QT=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia
    export OE_QMAKE_MOC=/usr/local/angstrom/arm/bin/moc4
    export OE_QMAKE_UIC=/usr/local/angstrom/arm/bin/uic4
    export OE_QMAKE_UIC3=/usr/local/angstrom/arm/bin/uic34
    export OE_QMAKE_RCC=/usr/local/angstrom/arm/bin/rcc4
    export OE_QMAKE_QDBUSCPP2XML=/usr/local/angstrom/arm/bin/qdbuscpp2xml4
    export OE_QMAKE_QDBUSXML2CPP=/usr/local/angstrom/arm/bin/qdbusxml2cpp4
    export OE_QMAKE_QT_CONFIG=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/share/qtopia/mkspecs/qconfig.pri
    export QMAKESPEC=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/share/qtopia/mkspecs/linux-g++@



  • qmake.conf is
    @#

    qmake configuration for linux-g++

    MAKEFILE_GENERATOR = UNIX
    TEMPLATE = app
    CONFIG += qt warn_on release incremental link_prl
    QT += core gui
    QMAKE_INCREMENTAL_STYLE = sublib

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

    modifications to g++.conf

    QMAKE_CC = sb2 gcc
    QMAKE_CXX = sb2 g++
    QMAKE_LINK = sb2 g++
    QMAKE_LINK_SHLIB = sb2 g++

    modifications to linux.conf

    QMAKE_AR = sb2 ar cqs
    QMAKE_OBJCOPY = sb2 objcopy
    QMAKE_STRIP = sb2 strip
    load(qt_config) @

    and i add vm.mmap_min_addr = 0 to /etc/sysctl.conf



  • Hi, I'm trying to do the same.
    But I'm using Angstrom image and SDK from http://narcissus.angstrom-distribution.org/ .

    Have you solved your problem?



  • yes, i set the wrong toolchain environment, should not use angstrom environment



  • Hi:
    I'm using Angstrom image and SDK from http://narcissus.angstrom-distribution.org/ . But I don't know how to use the SDK, could you give me some advice?

    Thanks a lot.

    Shihao Liu



  • I'm also using Angstrom and SDK from Narcissus to get QT running on a BeagleBoard-xM. I followed Luca's instructions at https://qt-project.org/wiki/Qt_on_the_BeagleBoard, although every time I use a complicated choice of options, the Narcissus page never completes building the package. So instead I started with a basic console-only version fo Angstrom and used 'opkg install <pkg>' to install most of the packages that Narcissus said it was putting together. From Narcissus I did get the SDK package, though, and extracted that to /usr/local/angstrom/arm. Now, I've got an X11 environment with network connectivity and displaying to an LCD monitor. However, I haven't been able to build a Hello World Qt project because my QMAKESPEC isn't setup correctly, which is where I need help.

    Normally, it looks like all the .conf files are in /usr/share/qt4/mkspecs/. I'm using G++, so my .../mkspecs/linux-g++/qmake.conf points to .../mkspecs/common/linux.conf and .../mkspecs/common/g++.conf.
    However, in the Angstrom-2012.03-narcissus-beagleboard-i686-random-2c3363a0-image-sdk.tar.gz package I got from Narcissus, /usr/local/angstrom/arm/ contains on an 'environment-setup' file and no mkspecs directory. In 'environment-setup' QMAKESPEC isn't defined. So when I source 'environment-setup' and then run qmake2, I get the error "QMAKESPEC has not been set, so configuration cannot be decuced."

    I also tried copying my Ubuntu copy of /usr/share/qt4/mkspecs/ to the Angstrom SD card at /usr/local/angstrom/arm/mkspecs/ and then added a QMAKESPEC definition in /usr/local/angstrom/arm/environment-setup to point to my new /usr/share/qt4/mkspecs/linux-g++. qmake2 seemed to be successful, but when I make the project, I get the error "g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/OE/angstrom-2008/build/tmp-angstrom_2008_l/sysroots/x86_64-linux/qt4/include/QtCore -I/OE/angstrom-2008/buld/tmp-angstrom_2008/build/tmp-angstrom_2008_l/sysroots/x86_64-linux/qt4/include -I. -o main.o main.cpp"

    and after that, the rest of the errors are that it can't find the QApplication and QPushButton headers...

    So my question is ...

    1. Should I have added an "export QMAKESPEC=..." line to /usr/local/angstrom/arm/environment-setup and if so, where should it point to?
    2. Was the Angstrom Qt SDK supposed to include the mkspecs folder?

    Since I'm just learning Qt and don't know these files yet, I guess my next option is to setup an OpenEmbedded build environment and try to build Qt from scratch.

    Jeremy



  • Also, Luca's instructions say to install the Qt src wherever you want. Is there another environment variable that's supposed to point to where the source code is?



  • hi i got similar problem
    i tried to compile the QT with following command by following “http://forums.digi.com/support/forum/viewthread_thread,6858#20693”

    ./configure -confirm-license -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/QtEmbedded-4.4.3 -hostprefix /usr/local/DigiEL-5.6/x-tools/arm-cortex_a8-linux-gnueabi -qt-sql-sqlite -depths 15,16 -qt-kbd-usb -qt-mouse-tslib
    

    and i got this error

    Basic XLib functionality test failed!
     You might need to modify the include and library search paths by editing
    QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/qmax/Desktop/QT_Latest/qt-x11-opensource-src-4.5.3/mkspecs/qws/linux-arm-g++.
    

    I tried the following
    Try 1:

    sudo apt-get build-dep qt4-qmake (installed)
    

    Ref:http://www.qtforum.org/article/27401/debian-xlib-test-failed-after-configure.html

    Try 2:

    sudo apt-get build-dep  libxext-dev
    

    Ref:http://www.qtforum.org/article/27886/installing-qt4-problem-basic-xlib-functionality-test-failed.html

    Try 3:

    sudo apt-get install libx11-dev libxau-dev libxaw7-dev libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev
    sudo apt-get install libxext-dev libxfixes-dev libxfont-dev libxft-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev
    sudo apt-get install libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev
    sudo apt-get install libglib2.0-dev
    sudo apt-get install libssl-dev
    sudo apt-get install libgtk2.0-dev
    sudo apt-get install libcups2-dev
    sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
    sudo apt-get install libgstreamer0.10-dev
    

    Ref:http://qt-project.org/wiki/Compile_Qt_4.7_on_Ubuntu_10.10

    Try 4:

    sudo apt-get install ^libxcb.* libx11-xcb-dev libglu1-mesa-dev libxrender-dev -y
    

    Ref:http://qt-project.org/forums/viewthread/15858

    But nothing works…still same error…..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.