Can't crosscompile Odroid XU3 with Qt 5.5 [SOLVED]



  • Hello,
    I am following https://wiki.qt.io/ODROID-XU3 and I am trying to build qt with crosscompiling on my Odroid XU3 lite board.
    The issue is that at the

    make -j10

    it doesn't find the headers which are located at sysroot/usr/include on the odroid.
    For example I have this kind of errors :

    /home/Odroid/Code/qt5.5/qtbase/src/corelib/tools/qbytearray.cpp:48:19 : fatal error : zconf.h No such file or directory

    A dirty way would be to copy the headers and the .so form the Odroid System in the qt repository but I don't think it's the good approach.

    Do you guys have any idea why it doesn't find the headers located at sysroot/usr/include on the odroid?



  • Some problem on cross compile may be, that the gcc on your host has different configuration than on your odroid.
    means different search path

    type
    g++ -E -x c++ - -v < /dev/null

    on both machines, your host and on your odroid
    then compare the lines starting from

    #include "..." search starts here:
    #include <...> search starts here:

    you'll notice they are diferent
    and there is the problem

    what you can do is

    cd to [qtsrc]/qtbase/mkspecs/devices/
    to let the original untouched
    make a copy of
    linux-odroid-xu3-g++/
    example:
    cp -R linux-odroid-xu3-g++ my_linux-odroid-xu3-g++
    cd into my_linux-odroid-xu3-g++
    and with your favorit editor and open qmake.conf
    add the lines you got from "g++ -E -x c++ - -v < /dev/null" on your odroid as include and libs

    example:
    if you got a line like
    /usr/include/arm-linux-gnueabihf/c++/4.8

    add it to your my_linux-odroid-xu3-g++/qmake.conf like

    QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf/c++/4.8

    if you got a line like

    /usr/lib/gcc/arm-linux-gnueabihf/4.8/include-fixed

    add it to your my_linux-odroid-xu3-g++/qmake.conf like

    QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib/gcc/arm-linux-gnueabihf/4.8/include-fixed

    whatch the difference in lib or include in the path

    then run the configure and change parameter -device to your new device file like
    -device my_linux-odroid-xu3-g++

    Ju



  • I forgot:

    the command
    g++ -E -x c++ - -v < /dev/null

    has to reflect your cross compiler on the host system

    in my case
    on the odroid is
    g++ -E -x c++ - -v < /dev/null

    on the host is

    /usr/bin/arm-linux-gnueabihf-g++



  • Thank you so much jgnoss :)

    I did exactly what you saidI just changed two things :

    • -device linux-myodroid-xu3 because I have the feeling it expects linux-[something]. I had device not found error otherwise.
    • I replaced $[QT_SYSROOT] with the absolute path : /home/odroid/Code/Odroid/sysroot . Otherwise I had the same error as before it wan't finding the .h files.

    It is still compiling for now. So far no error. Maybe I will have other errors but for sure the build already went further this particular error.

    I had been stuck on that for 2 weeks, many many thanks !



  • ohh sorry, yes that's right
    it should be
    linux-someplatform_something

    I just wrote that out of my head not thinking in the device name convention

    and the $[QT_SYSROOT] prefix has to have two $ signs
    $$[QT_SYSROOT]

    works for me



  • ahh here it comes, i should learn about the right syntax of the forum editor

    another time he eat the second $ sign in front of the variable name



  • haha oki :)
    Thanks !



  • After hours of compilation, I have these errors :
    I didn't find much on these on the web :(

    /home/odroid/Code/Odroid/sysroot/usr/include/c++/4.9/bits/stl_vector.h:803: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
    /home/odroid/Code/Odroid/sysroot/usr/include/c++/4.9/bits/stl_vector.h:803: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
    /home/odroid/Code/Odroid/sysroot/usr/include/c++/4.9/bits/stl_bvector.h:788: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
    /home/odroid/Code/Odroid/sysroot/usr/include/c++/4.9/bits/stl_bvector.h:788: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' 
    

    Any idea?



  • I am trying with gcc/g++ 4.8 instead of 4.9, we will see if it changes something.



  • Doens't work, I am done with that :(


Log in to reply