QT For ARM-Cortex-A15



  • Hi dear friends,
    I install QT Creator 5.5 on my ubuntu host and i'm attempting to cross-compile my application to arm-cortex-a15 based platform. In order to do it i used qmake, In the mkspecs directory i found only the arm-gnueabi compiler and i need the arm-gnueabihf compiler. The compiler arm-gnueabihf is already installed on my host and i create on the mkspecs the folder arm-gnueabihf with the correct compiler sets for the spec option in the qmake. When i run the qmake i got the Makefile withe the correct compilers settings but when i try to compile it i get on the linker phase errror indicator that i can't solve. I attached the compilation results and the error:

    /opt/Qt5.0.1/5.0.1/gcc/bin/uic ../GUI/mainwindow.ui -o ui_mainwindow.h
    arm-linux-gnueabihf-g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.1/5.0.1/gcc/mkspecs/linux-arm-gnueabihf-g++ -I../GUI -I/opt/Qt5.0.1/5.0.1/gcc/include -I/opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets -I/opt/Qt5.0.1/5.0.1/gcc/include/QtGui -I/opt/Qt5.0.1/5.0.1/gcc/include/QtCore -I. -I. -I. -o main.o ../GUI/main.cpp
    In file included from /opt/Qt5.0.1/5.0.1/gcc/include/QtCore/qobject.h:48:0,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/qwidget.h:46,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/qmainwindow.h:45,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/QMainWindow:1,
    from ../GUI/mainwindow.h:4,
    from ../GUI/main.cpp:1:
    /opt/Qt5.0.1/5.0.1/gcc/include/QtCore/qstring.h:300:17: note: the mangling of ‘va_list’ has changed in GCC 4.4
    arm-linux-gnueabihf-g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.1/5.0.1/gcc/mkspecs/linux-arm-gnueabihf-g++ -I../GUI -I/opt/Qt5.0.1/5.0.1/gcc/include -I/opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets -I/opt/Qt5.0.1/5.0.1/gcc/include/QtGui -I/opt/Qt5.0.1/5.0.1/gcc/include/QtCore -I. -I. -I. -o mainwindow.o ../GUI/mainwindow.cpp
    In file included from /opt/Qt5.0.1/5.0.1/gcc/include/QtCore/qobject.h:48:0,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/qwidget.h:46,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/qmainwindow.h:45,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/QMainWindow:1,
    from ../GUI/mainwindow.h:4,
    from ../GUI/mainwindow.cpp:1:
    /opt/Qt5.0.1/5.0.1/gcc/include/QtCore/qstring.h:300:17: note: the mangling of ‘va_list’ has changed in GCC 4.4
    /opt/Qt5.0.1/5.0.1/gcc/bin/moc -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.1/5.0.1/gcc/mkspecs/linux-arm-gnueabihf-g++ -I../GUI -I/opt/Qt5.0.1/5.0.1/gcc/include -I/opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets -I/opt/Qt5.0.1/5.0.1/gcc/include/QtGui -I/opt/Qt5.0.1/5.0.1/gcc/include/QtCore -I. -I. -I. ../GUI/mainwindow.h -o moc_mainwindow.cpp
    arm-linux-gnueabihf-g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.1/5.0.1/gcc/mkspecs/linux-arm-gnueabihf-g++ -I../GUI -I/opt/Qt5.0.1/5.0.1/gcc/include -I/opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets -I/opt/Qt5.0.1/5.0.1/gcc/include/QtGui -I/opt/Qt5.0.1/5.0.1/gcc/include/QtCore -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
    In file included from /opt/Qt5.0.1/5.0.1/gcc/include/QtCore/qobject.h:48:0,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/qwidget.h:46,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/qmainwindow.h:45,
    from /opt/Qt5.0.1/5.0.1/gcc/include/QtWidgets/QMainWindow:1,
    from ../GUI/mainwindow.h:4,
    from moc_mainwindow.cpp:9:
    /opt/Qt5.0.1/5.0.1/gcc/include/QtCore/qstring.h:300:17: note: the mangling of ‘va_list’ has changed in GCC 4.4
    arm-linux-gnueabihf-g++ -Wl,-rpath,/opt/Qt5.0.1/5.0.1/gcc -Wl,-rpath,/opt/Qt5.0.1/5.0.1/gcc/lib -o GUI main.o mainwindow.o moc_mainwindow.o -L/opt/Qt5.0.1/5.0.1/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
    /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /opt/Qt5.0.1/5.0.1/gcc/lib/libQt5Widgets.so when searching for -lQt5Widgets
    /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lQt5Widgets
    /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /opt/Qt5.0.1/5.0.1/gcc/lib/libQt5Gui.so when searching for -lQt5Gui
    /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lQt5Gui
    /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /opt/Qt5.0.1/5.0.1/gcc/lib/libQt5Core.so when searching for -lQt5Core
    /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lQt5Core
    /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    make: *** [GUI] Error 1

    Can you specified what i'm doing wrong?
    Thanks for your help,
    Regards, Yakov S.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you first cross-compile Qt ?



  • Yes, I was cross complie with other platforms but with QT it's the first time.


  • Lifetime Qt Champion

    Sorry, my question might have not been clear enough. Let's try again: before compiling your project, did you, as a first step, cross-compile the Qt framework itself ?



  • SGaist Hi,
    The only thing that i did is downloading the QT creator 5.5 and install it, I created simple GUI that work on my host and now i wish to compile my GUI for my target that is a ARM based Embedded Ubuntu 14.04 32-bit.
    So i didn't compile the QT framework.

    Regards, Yakov S.



  • @Jaykovs You need Qt framework libraries available for your target platform. In your case, it's very likely that you need to build them by yourself, and mainly, by cross-compiling them. Remember that Qt Creator is just an IDE (a good one indeed) but your application depends on Qt libraries, not the IDE.



  • Pablo J. Rogina,
    Do you know a guide that describe how to do it step by step?
    Regards, Yakov S.



  • @Jaykovs I don't know any guide for specific platform, but I'd follow some of the guides to cross-compile Qt (mainly for Raspberry Pi) that can help you as a reference. BTW, what device is the one you're using?

    Examples:
    http://forum.qt.io/topic/56049/setting-up-cross-compiler-rasp-pi/10
    http://processors.wiki.ti.com/index.php/Building_Qt#Building_Qt.C2.A0
    http://doc.qt.io/QtEnterpriseEmbedded/qtee-custom-embedded-linux-image.html


Log in to reply
 

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