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. [Solved] Can't find STL when do Qt 5.3 cross-compiling
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 3 Posters 9.2k Views 1 Watching
  • 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 Offline
    F Offline
    Fahmy
    wrote on last edited by
    #1

    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
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Fahmy
        wrote on last edited by
        #3

        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
        0
        • F Offline
          F Offline
          Fahmy
          wrote on last edited by
          #4

          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
          0
          • E Offline
            E Offline
            EricZ89
            wrote on last edited by
            #5

            .

            1 Reply Last reply
            0
            • E Offline
              E Offline
              EricZ89
              wrote on last edited by
              #6

              .

              1 Reply Last reply
              0

              • Login

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