Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can't crosscompile Odroid XU3 with Qt 5.5 [SOLVED]

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

Scheduled Pinned Locked Moved Mobile and Embedded
odroid
10 Posts 2 Posters 3.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BlackMamba
    wrote on 17 Jul 2015, 20:57 last edited by BlackMamba
    #1

    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?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jgnoss
      wrote on 18 Jul 2015, 14:55 last edited by
      #2

      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

      J 1 Reply Last reply 18 Jul 2015, 14:58
      1
      • J jgnoss
        18 Jul 2015, 14:55

        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

        J Offline
        J Offline
        jgnoss
        wrote on 18 Jul 2015, 14:58 last edited by
        #3

        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++

        1 Reply Last reply
        1
        • B Offline
          B Offline
          BlackMamba
          wrote on 18 Jul 2015, 20:14 last edited by BlackMamba
          #4

          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 !

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jgnoss
            wrote on 18 Jul 2015, 20:35 last edited by
            #5

            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

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jgnoss
              wrote on 18 Jul 2015, 20:38 last edited by
              #6

              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

              1 Reply Last reply
              0
              • B Offline
                B Offline
                BlackMamba
                wrote on 18 Jul 2015, 21:01 last edited by
                #7

                haha oki :)
                Thanks !

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  BlackMamba
                  wrote on 19 Jul 2015, 09:54 last edited by
                  #8

                  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?

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    BlackMamba
                    wrote on 19 Jul 2015, 20:39 last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      BlackMamba
                      wrote on 20 Jul 2015, 19:15 last edited by
                      #10

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

                      1 Reply Last reply
                      0

                      10/10

                      20 Jul 2015, 19:15

                      • Login

                      • Login or register to search.
                      10 out of 10
                      • First post
                        10/10
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved