Cross-compile Qt 5.1.0 for armv7



  • Hello,

    i'm trying to cross-compile Qt5.1.0 for an ARMv7

    My Host system is Ubuntu:
    @Linux ubuntu 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012 i686 GNU/Linux@

    My Target System is:
    @proc/cpu/ /proc/cpuinfo
    root@dm816x-evm:~# cat /proc/cpuinfo
    Processor : ARMv7 Processor rev 2 (v7l)
    BogoMIPS : 986.31
    Features : swp half thumb fastmult vfp edsp neon vfpv3
    CPU implementer : 0x41
    CPU architecture: 7
    CPU variant : 0x3
    CPU part : 0xc08
    CPU revision : 2@

    When I exec make command I have this error:
    @/home/uesr/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-g++ -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -ftree-vectorize -funroll-all-loops -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DATASTREAM -DQT_BUILD_TESTLIB_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../mkspecs/linux-arm-gnueabi-ti-g++ -I. -I../../include -I../../include/QtTest -I../../include/QtTest/5.1.0 -I../../include/QtTest/5.1.0/QtTest -I../../include/QtCore -I../../include/QtCore/5.1.0 -I../../include/QtCore/5.1.0/QtCore -I.moc/release-shared -I/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include -I/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include/glib-2.0 -I/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/lib/glib-2.0/include -I/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include/libxml2 -I/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include/freetype2 -I/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include/dbus-1.0 -I/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include/dbus-1.0/dbus -o .obj/release-shared/qbenchmarkperfevents.o qbenchmarkperfevents.cpp
    qbenchmarkperfevents.cpp: In function 'int perf_event_open(perf_event_attr*, pid_t, int, int, long unsigned int)':
    qbenchmarkperfevents.cpp:133: error: 'SYS_perf_event_open' was not declared in this scope
    make[3]: *** [.obj/release-shared/qbenchmarkperfevents.o] Error 1
    make[3]: Leaving directory /home/uesr/Desktop/qt5.1.0/qt-everywhere-opensource-src-5.1.0/qtbase/src/testlib' make[2]: *** [sub-testlib-make_first] Error 2 make[2]: Leaving directory/home/uesr/Desktop/qt5.1.0/qt-everywhere-opensource-src-5.1.0/qtbase/src'
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory `/home/uesr/Desktop/qt5.1.0/qt-everywhere-opensource-src-5.1.0/qtbase'
    make: *** [module-qtbase-make_first] Error 2@

    "The output of command env is here":https://dl.dropboxusercontent.com/u/24347985/qt5.1.0/env.txt

    My qmake.conf (placed in
    "/home/uesr/Desktop/qt5.1.0/qt-everywhere-opensource-src-5.1.0/qtbase/mkspecs/linux-arm-gnueabi-ti-g++") is:

    @#

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

    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental gdb_dwarf_index
    QMAKE_INCREMENTAL_STYLE = sublib

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

    ROOTFS_PATH=/home/uesr/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi
    TOOLCHAIN_PREFIX=/home/uesr/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi

    Change the required paths here

    QMAKE_INCDIR = $${ROOTFS_PATH}/usr/include $${ROOTFS_PATH}/usr/include/glib-2.0 $${ROOTFS_PATH}/usr/lib/glib-2.0/include/ $${ROOTFS_PATH}/usr/include/libxml2/ $${ROOTFS_PATH}/usr/include/freetype2 $${ROOTFS_PATH}/usr/include/dbus-1.0 $${ROOTFS_PATH}/usr/include/dbus-1.0/dbus

    QMAKE_LIBDIR = $${ROOTFS_PATH}/usr/lib/arm-linux-gnueabi $${ROOTFS_PATH}/usr/lib

    QMAKE_INCDIR_OPENGL_ES2 = $${ROOTFS_PATH}/usr/include/sgx/OGLES2
    QMAKE_LIBDIR_OPENGL_ES2 = $${ROOTFS_PATH}/opt/gfxlibraries/gfx_rel_es8.x
    QMAKE_INCDIR_EGL = $${QMAKE_INCDIR_OPENGL_ES2}
    QMAKE_LIBDIR_EGL = $${QMAKE_LIBDIR_OPENGL_ES2}

    libs

    QMAKE_LIBS = -lxml2 -lz -lts -lasound -lfreetype -lexpat
    -lfontconfig -lpng -lpthread -Wl,-rpath-link=$${ROOTFS_PATH}/usr/lib/arm-linux-gnueabi -Wl,-rpath-link=$${ROOTFS_PATH}/usr/lib

    QMAKE_LIBS_OPENGL_ES2= -lEGL -lIMGegl -lsrv_um -lGLESv2 -lGLES_CM -lusc
    QMAKE_LIBS_EGL= $${QMAKE_LIBS_OPENGL_ES2}
    QMAKE_LIBS_THREAD = -lpthread

    QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -ftree-vectorize -funroll-all-loops

    QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE

    QMAKE_CC = $${TOOLCHAIN_PREFIX}-gcc
    QMAKE_CXX = $${TOOLCHAIN_PREFIX}-g++
    QMAKE_LINK = $${QMAKE_CXX}
    QMAKE_LINK_SHLIB = $${QMAKE_CXX}

    QMAKE_AR = $${TOOLCHAIN_PREFIX}-ar cqs
    QMAKE_OBJCOPY = $${TOOLCHAIN_PREFIX}-objcopy
    QMAKE_STRIP = $${TOOLCHAIN_PREFIX}-strip

    load(qt_config)
    @

    My configre command is:

    @./configure -prefix /home/eurotech/Desktop/qt5.1.0/qt_5.1.0.build -release -make libs -xplatform linux-arm-gnueabi-ti-g++ -confirm-license -opensource -no-icu -no-xcb -make examples -verbose -nomake tests -no-compile-examples -no-c++11@

    "The output of summary configure is here":https://dl.dropboxusercontent.com/u/24347985/qt5.1.0/configure.txt

    Please help

    Thx!!!!


Log in to reply
 

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