[Solved] I don't use my custom build Qt



  • Update:
    I use different compiler to compile Qt framework and to my project. If I compile those with same compiler, the problem doesn't occurs longer.

    Hi People,

    My problem is the following:

    • I have an ARM Cortex A8 based embedded device.
    • On this device would like I run an custom Qt application.
    • I build the Qt 5.0.2 framework from source for those.

    Everything is OK during the building, but I don't can compile my fist test application which uses a simple QVector instance, like this:

    @
    int main()
    {
    QVector<int> v;
    return 0;
    }
    @

    I got the following error from the linker:
    @
    g++ -Wl,-O1 -Wl,-rpath,/home/<path>/bin/lib -o masterController main.o -L/home/<path>/bin/lib -lQt5Core -lpthread
    main.o: In function main': /home/<path>/masterController/../../../../<path>/include/QtCore/qvector.h:76: undefined reference toQArrayData::deallocate(QArrayData*, unsigned long, unsigned long)'
    collect2: ld returned 1 exit status
    @
    This messages says that the linker doesn't found any "deallocate" method which accept two unsigned long parameter. I list the libQt5Core.so lib with the following command:
    @
    readelf -Ws libQt5Core.so | grep deallocate | c++filt
    @

    and got this:
    @
    3219: 0006dfed 20 FUNC GLOBAL DEFAULT 12 QArrayData::deallocate(QArrayData*, unsigned int, unsigned int)
    @

    So I have "deallocate" method, but at compile time the parameters are identify as unsigned int -s but the linker looking for unsigned long-s.

    I don't any idea how can I fix this bug. Have anybody some tip?

    Regards,
    Norbert


  • Lifetime Qt Champion

    Hi,

    Are you sure you are using the cross-compiler ? g++ is generally the compiler installed on your system. You should rather have something like arm-linux-something-g++ while compiling for your target.



  • Hi,

    I don't use the traditional meaning cross compilation. The board has 1GHz CPU and 1GB RAM so I decided that it is able to compile the full Qt framework itself.
    What you see in the logs as "g++" is the output from the ssh console of embedded board.

    Regards,
    Norbert


  • Lifetime Qt Champion

    Ok, so your compiling everything directly on your target.

    Your paths look strange to me. Did you install your Qt 5 build properly ?



  • Hi,

    my path looks out in the first post:
    "/home/<path>/bin/lib"
    because I don't would like displaying the full length of path, but the original path looks like this:
    "/home/moravas/project/thesisOfMSC/cubie/bin/lib"

    Regards,
    Norbert


  • Lifetime Qt Champion

    That doesn't answer my first question:

    Did you compile and install Qt 5 properly on your target ?



  • yes, I ran configure, make, make check and make install.
    For configure I specified the install path, c++11 support, and -no-pch.

    Regards,
    Norbert



  • Hi,

    some update: I am looking for some error on the internet and I found the following two bug reports:
    https://codereview.qt-project.org/#change,32868
    https://codereview.qt-project.org/#change,33493

    They have same error messages and the status of ticket is closed and solved, but I don't understand where I can reach the solution (branch, Qt release, tag, etc...)

    Can anybody help me? :(

    Thank you
    Regards,
    Norbert


Log in to reply
 

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