Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Solved] Can't find STL when do Qt 5.3 cross-compiling

    Mobile and Embedded
    3
    6
    8428
    Loading More Posts
    • 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.
    • F
      Fahmy last edited by

      I try to do cross-compiling Qt 5.3 to armv7. This is parameters that I'm using for configure.
      @../configure -v
      -opensource
      -confirm-license
      -release
      -opengl es2
      -optimized-qmake
      -no-pch
      -make libs
      -make tools
      -reduce-exports
      -sysroot /home/fahmy/BananaPi/rootfs
      -xplatform arm-linux-gnueabihf-g++
      -prefix /usr/local/Qt-5.3-BPi@

      The problem is, it can't find string.h or iterator.h..Basically it failed to find STL lib. From the verbose message it seems that makefile don't include dir for INCLUDE dan LIB in sysroot.

      @EGL enabled.
      EGL-X11 auto-detection... ()
      arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/fahmy/BananaPi/rootfs -O2 -Wall -W -fPIE -I/home/fahmy/Sources/qt5/qtbase/mkspecs/arm-linux-gnueabihf-g++ -I/home/fahmy/Sources/qt5/qtbase/config.tests/qpa/egl-x11 -I/home/fahmy/BananaPi/rootfs/usr/include/arm-linux-gnueabihf -I/home/fahmy/BananaPi/rootfs/usr/include/libdrm -I. -o egl-x11.o /home/fahmy/Sources/qt5/qtbase/config.tests/qpa/egl-x11/egl-x11.cpp
      arm-linux-gnueabihf-g++ -Wl,-O1 -o egl-x11 egl-x11.o --sysroot=/home/fahmy/BananaPi/rootfs -L/home/fahmy/BananaPi/rootfs/usr/lib/arm-linux-gnueabihf -lEGL -lxcb -lX11 -lX11-xcb
      EGL-X11 enabled.
      STL auto-detection... ()
      arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/fahmy/BananaPi/rootfs -O2 -Wall -W -fPIE -I/home/fahmy/Sources/qt5/qtbase/mkspecs/arm-linux-gnueabihf-g++ -I/home/fahmy/Sources/qt5/qtbase/config.tests/unix/stl -I. -o stltest.o /home/fahmy/Sources/qt5/qtbase/config.tests/unix/stl/stltest.cpp
      /home/fahmy/Sources/qt5/qtbase/config.tests/unix/stl/stltest.cpp:47:20: fatal error: iterator: No such file or directory
      #include <iterator>
      ^
      compilation terminated.
      make: *** [stltest.o] Error 1
      STL disabled.
      STL functionality check failed! Cannot build Qt with this STL library.
      @

      How to fix it?

      Stay hungry, stay foolish.

      1 Reply Last reply Reply Quote 0
      • A
        andreyc last edited by

        Try to add explicitly a directory with STL headers
        @
        ./configure ... -I <path/to/STL/headers> ...
        @

        1 Reply Last reply Reply Quote 0
        • F
          Fahmy last edited by

          Already done that. But it still occurs. Here is some errors message.

          @ICU auto-detection... ()
          arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/fahmy/BananaPi/rootfs -O2 -Wall -W -fPIE -I/home/fahmy/Sources/qt5/qtbase/mkspecs/arm-linux-gnueabihf-g++ -I/home/fahmy/Sources/qt5/qtbase/config.tests/unix/icu -I/home/fahmy/BananaPi/rootfs/usr/include -I. -o icu.o /home/fahmy/Sources/qt5/qtbase/config.tests/unix/icu/icu.cpp
          In file included from /home/fahmy/BananaPi/rootfs/usr/include/unicode/unistr.h:31:0,
          from /home/fahmy/BananaPi/rootfs/usr/include/unicode/strenum.h:14,
          from /home/fahmy/BananaPi/rootfs/usr/include/unicode/uenum.h:24,
          from /home/fahmy/BananaPi/rootfs/usr/include/unicode/uloc.h:25,
          from /home/fahmy/BananaPi/rootfs/usr/include/unicode/ucol.h:18,
          from /home/fahmy/Sources/qt5/qtbase/config.tests/unix/icu/icu.cpp:43:
          /home/fahmy/BananaPi/rootfs/usr/include/unicode/std_string.h:39:18: fatal error: string: No such file or directory
          #include <string>
          ^
          compilation terminated.
          make: *** [icu.o] Error 1
          ICU disabled.
          @

          Stay hungry, stay foolish.

          1 Reply Last reply Reply Quote 0
          • F
            Fahmy last edited by

            I've solved this problem. It seems that depend libraries located in different path in Debian ARM. So, I've put in these dir in qmake.conf.

            @$$[QT_SYSROOT]/usr/include/c++/4.7/
            $$[QT_SYSROOT]/usr/include/c++/4.7/arm-linux-gnueabihf/@

            Stay hungry, stay foolish.

            1 Reply Last reply Reply Quote 0
            • E
              EricZ89 last edited by

              .

              1 Reply Last reply Reply Quote 0
              • E
                EricZ89 last edited by

                .

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post