Undefined reference when cross compiling for Tegra2?



  • Hi,
    I'm trying to cross-compile for a Tegra2 board (Colibri T20, Toradex, running Angström 2013.06), and I've run into a strange problem.
    If this has been answered before, my apologies. I've used the search and couldn't find anything.

    I've downloaded the Qt5.3 sources from Git, and configured the build with the command line:
    @./configure -developer-build -opensource -nomake examples -nomake tests -prefix /opt/qt5-t20 -device tegra2 -device-option CROSS_COMPILE=~/oe-core/build/out-eglibc/sysroots/i686-linux/usr/bin/armv7ahf-vfp-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi- -sysroot ~/oe-core/build/out-eglibc/sysroots/colibri-t20@

    I needed to modify the qmake.conf for linux-tegra2-g++. It looks like this:
    @#

    qmake configuration for the Tegra2 boards.

    This device-spec is based and tested on the Toradex Colibri-T20 using "Ubuntu Desktop 12.04"

    -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16 -- I've taken this out of the TEGRA2_CFLAGS

    include(../common/linux_device_pre.conf)

    QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include

    QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib
    $$[QT_SYSROOT]/lib/arm-angstrom-linux-gnueabi
    $$[QT_SYSROOT]/usr/lib/arm-angstrom-linux-gnueabi

    QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib
    -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-angstrom-linux-gnueabi
    -Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-angstrom-linux-gnueabi

    DISTRO_OPTS += "hard-float"
    TEGRA2_CFLAGS = -mtune=cortex-a9 -march=armv7-a
    QMAKE_CFLAGS += $$TEGRA2_CFLAGS
    QMAKE_CXXFLAGS += $$TEGRA2_CFLAGS

    include(../common/linux_arm_device_post.conf)

    load(qt_config)@
    This was required as it wouldn't even configure otherwise. Now it configures without issues.

    Then I run the command:
    @make -j 8@

    Eventually I get the error:
    @obj/qftp.o: In function QConcatenable<QLatin1String>::appendTo(QLatin1String, QChar*&)': /home/dominik/qt5/qtbase/src/network/../../include/QtCore/../../src/corelib/tools/qstringbuilder.h:242: undefined reference toQAbstractConcatenable::appendLatin1To(char const*, int, QChar*)'
    collect2: error: ld returned 1 exit status
    make[3]: *** [../../lib/libQt5Network.so.5.3.2] Error 1
    make[3]: Leaving directory /home/dominik/qt5/qtbase/src/network' make[2]: *** [sub-network-make_first] Error 2 make[2]: Leaving directory/home/dominik/qt5/qtbase/src'
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory `/home/dominik/qt5/qtbase'
    make: *** [module-qtbase-make_first] Error 2@

    I've tried building for desktop, and that works without a hitch. I'm quite confused as to why this is happening. It's suddenly missing a script from Qt. I have tried cleaning, re-building and re-downloading the sources, the issue remains.

    Any ideas what might be going on here?





  • Hi,
    Thanks, but I've already done that.

    It will compile all examples and libraries for the target properly when I use the existing board support package, but it's not of much use. I can execute the examples no problem, but I have no cross compiler toolchain that is compatible with Qt5 for the device.

    The toolchain you'd install using the process described at http://developer.toradex.com/how-to/how-to-set-up-qt-creator-to-cross-compile-for-embedded-linux builds a toolchain for Qt 4.8.4.

    The bitbake recipe meta-toolchain-qt5 does exist, but that doesn't want to build either. It's having trouble with gstreamer1.0-plugins-base, and at some point it's trying to access the file @/build/include/QtCompositor/5.3.0/QtCompositor/private/{qwayland-server-*,protocol}.h@
    even though it's building for Qt 5.2.1 and not 5.3.0. And the file name hints to me that some environment value that should be set isn't set, but I haven't got the slightest clue what it might be.

    I have messaged Toradex support about this twice now, and haven't gotten a response. So I'm trying to do this via the source code, but I appear to have hit a brick wall.



  • @SirLollington I got the same issue, have you found the way to bitbake qt5 toolchain for toradex?


Log in to reply
 

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