Important: Please read the Qt Code of Conduct -

Unable to compile hello-qtonpi project with Qt Creator !

  • Hello everyone !
    This is my first post in this forum ! :)
    I have installed the setup required to deploy Qt apps to Raspberry pi :
    When I first tried to 'build all' , it was giving following errors :

    @I/opt/qt5/include/QtXmlPatterns -I/opt/qt5/include/QtQml -I/opt/qt5/include/QtDeclarative -I/opt/qt5/include/QtQuick -I../hello-qtonpi -I/opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root/opt/vc/include -I. -I. -o main.o ../hello-qtonpi/main.cpp
    /opt/qtonpi/bin/armv5tel-qtonpi-linux-gnueabi-g++: /lib/ version GLIBC_2.11' not found (required by /opt/qtonpi/bin/armv5tel-qtonpi-linux-gnueabi-g++) make: *** [main.o] Error 1 make: Leaving directory/home/student/hello-qtonpi-build-desktop-Qt_5_0_0__qt5__Release'
    19:42:15: The process "/usr/bin/make" exited with code 2.
    Error while building project hello-qtonpi (target: Desktop)
    When executing build step 'Make'@

    Then I downloaded and installed glibc-2.11.2 in my home dir. After added that path in project-->Build-Settings-->Build Environment--> LD_LIBRARY_PATH. After doing this It is not giving previous error but the new one :(

    @19:24:56: Running build steps for project hello-qtonpi...
    19:24:56: Configuration unchanged, skipping qmake step.
    19:24:56: Starting: "/usr/bin/make" -w
    19:24:56: The process "/usr/bin/make" crashed.
    Error while building project hello-qtonpi (target: Desktop)
    When executing build step 'Make'@

    Could anyone please guide me since I am totally new to Qt and its SDK....

  • Hi Shantanu,

    Welcome to the forum.

    The link you use is obsolete. I recommend not to use it therefore. (I will add a remark on top of that page)

    Try the "Beginner’s guide to cross-compile Qt5 on RaspberryPi":

    Let us know how it went. I'm planning to follow this tutorial also the next few days ;-)

  • Moderators

    Updating glibc like that is bound to cause crashes:-) Get a tool chain that works for your machine instead.

  • Thanks Eddy and Tobias !

    Yesterday night I got it worked with my laptop which has latest tool-chain. (But haven't deployed it to RPi since I don't have necessary setup there). So I need to configure it for my work PC which has GLIBC 2.10.
    As I mentioned, I also installed glibc 2.11.2 but it's not working with that installation. Any help with it ?

    Also I will try the new link.... (? can I use Arch Linux there instead of Raspbian)

  • Shantanu

    Here's a link to a Wheezy distro and qt5 I got working and now fully operational.
    I created a new user in Ubuntu and had to rerun the ./bakeqtpi.bash script several times to get it to finish. It stops on several errors. Make sure you create the opt directory in your home directory first and start there.

    I skipped the SetFile stuff as that is only necessary on Apple. So make sure you have an sd card ready as it creates the the environment on it.

    I am now happily developing and running a large Qt program on the PI with all the debugging stuff of Qt Creator.

    Hope it works for you.

    Pierre Chicoine

  • Thank you for such an enthusiastic reply Pierre !
    I'll work on it tomorrow and let you all know the status ! :)

  • Hello forum,
    I followed exact instructions mentioned on the page, but again something is going wrong. :(

    Firstly in 'getting started section' the instruction was not getting executed
    @git fetch\ refs/changes/56/27256/4 && git cherry-pick FETCH_HEAD
    fatal: Cannot find 'FETCH_HEAD'@

    So I neglected it, since the first part of the command got executed
    then, in 'Compile Qt base' section
    when I gave

    make -j 4

    I got this error
    @../../../include/QtCore/../../src/corelib/plugin/quuid.h: In constructor ‘QUuid::QUuid(uint, ushort, ushort, uchar, uchar, uchar, uchar, uchar, uchar, uchar, uchar)’:
    ../../../include/QtCore/../../src/corelib/plugin/quuid.h:92: error: conversion from ‘<brace-enclosed initializer list>’ to non-scalar type ‘uchar [8]’ requested
    make[3]: *** [.obj/release-shared/qvariant.o] Error 1
    make[3]: *** [.obj/release-shared/qmetatype.o] Error 1
    make[3]: Leaving directory /home/student/opt/qt5/qtbase/src/tools/bootstrap' make[2]: *** [sub-tools-bootstrap-make_first] Error 2 make[2]: Leaving directory/home/student/opt/qt5/qtbase/src/tools'
    make[1]: *** [sub-tools-make_first] Error 2
    make[1]: Leaving directory `/home/student/opt/qt5/qtbase/src'
    make: *** [sub-src-make_first] Error 2

    what may be the flaw ?

Log in to reply