Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    [(partially)SOLVED] Compiling QT5 SDK on a raspberry pi

    Installation and Deployment
    1
    3
    7812
    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.
    • V
      varesa last edited by

      I wanted to compile the sdk directly on the rpi(wasn't in a "hurry" + wanted to see how it would turn out).

      Using this guide: http://qt-project.org/wiki/RaspberryPi_Beginners_guide, I checked out the sources, and ran a slightly modified ./configure. Because I wasn't trying to cross-compile, I removed the cross-compile and sysroot parameters:

      Original:
      @ ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/paulo/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -make libs -prefix /usr/local/qt5pi@

      My command:
      @./configure -opengl es2 -device linux-rasp-pi-g++ -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -make libs -prefix /usr/local/qt5pi@

      After a while it finally finished, but the last lines were:
      @Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
      Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
      qmake is broken

      Could not determine the target architecture!
      Turn on verbose messaging (-v) to see the final report.
      The OpenGL ES 2.0 functionality test failed!
      You might need to modify the include and library search paths by editing
      QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
      /home/esa/sources/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++.
      *** qtbase/configure exited with non-zero status.
      @

      I had not redirected stdout/stderr to anything, so something that might have been displayed before is lost, unless ./configure makes a log out of the errors? Somekind of log of what happened (the actual error message) would really help locating the problem.

      The only errors/warnings I saw during the compilation were like this:
      @/home/esa/sources/qt5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:300:17: note: the mangling of ‘va_list’ has changed in GCC 4.4
      @

      My version of g++:
      @$ g++ -v
      Using built-in specs.
      COLLECT_GCC=g++
      COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
      Target: arm-linux-gnueabihf
      Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-8+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
      Thread model: posix
      gcc version 4.6.3 (Debian 4.6.3-8+rpi1)
      @

      Am I possibly missing some dependency, or is there something else wrong with my environment, or compiling on the pi itself altogether? I could just set up a cross compiler in a vm, following the linked guide, but I'm interested in why this fails.

      EDIT: I realised that the -v option does not require you to do the whole process again. Here is the output with the -v added to the command: "https://gist.github.com/3868593":https://gist.github.com/3868593

      Seems that the version expects to be cross-compiled, and gives errors on CROSS_COMPILE not being set

      1 Reply Last reply Reply Quote 0
      • V
        varesa last edited by

        So does anyone know if it is possible to compile qt on a pi or how to do it?

        1 Reply Last reply Reply Quote 0
        • V
          varesa last edited by

          The error does not seem to have anything to do with the pi itself, as I also get it in my cross-compile environment on my x86 desktop machine. However I did find the fix to the problem:

          I should have read the end of the guide, where it tells what to do if it can't determine architechture...

          You just have to checkout the master branch on git

          However I am having another problem (building on a x86 machine this time), and make does not seem to get through. I am posting about it in my other thread: http://qt-project.org/forums/viewthread/21114/

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