Installing Cross-Compile environment for Raspberry Pi with Qt 5.7



  • I have a working cross-compile enviroment for developing for my Raspberry Pi with Qt. But I decided to make a new enviroment with Minibian. This image is much smaller, it saves me more then 5 gb. I have followed the whole tutorial on https://wiki.qt.io/RaspberryPi2EGLFS with the only exception that I cloned the 5.7 version instead of 5.6. But when I look at the compile summary of qtbase, one thing caught my eye, and that is EGLFS Raspberry Pi shows no. I expected that it would show yes.

    EGLFS ................ yes
          EGLFS i.MX6 ........ no
          EGLFS i.MX6 Wayland. no
          EGLFS EGLDevice .... yes
          EGLFS GBM .......... yes
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . no
          EGLFS X11 .......... yes
    

    Can someone tell me how I can compile qtbase with that option to yes?

    Edit: I think this is not the right forumboard to ask. Can this topic be moved to the board "Installation and Deployment"


  • Moderators

    @Vulpecula To know why something is not enabled you should check the output of configure command. Usually it is due missing header files or libraries. So check the configure output.
    How did you call configure?



  • I used the method descripted on the wiki.

    ./configure -release -opengl es2 -device linux-rasp-pi2-g++ \
    -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \
    -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs \
    -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
    

    Hereby the rest of the summary file:

    Configure summary
    
    Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for:  devices/linux-rasp-pi2-g++ (arm, CPU features: neon)
    Platform notes:
    
                - Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
            
    qmake vars .......... styles += mac fusion windows QT_LIBS_DBUS = -L/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf -ldbus-1 QT_CFLAGS_DBUS = -I/home/frank/raspi/sysroot/usr/include/dbus-1.0 -I/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf/dbus-1.0/include QT_HOST_CFLAGS_DBUS = -I/home/frank/raspi/sysroot/usr/include/dbus-1.0 -I/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf/dbus-1.0/include QT_CFLAGS_GLIB = -pthread -I/home/frank/raspi/sysroot/usr/include/glib-2.0 -I/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include QT_LIBS_GLIB = -L/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf -lgthread-2.0 -pthread -lglib-2.0 QT_CFLAGS_PULSEAUDIO = -D_REENTRANT -I/home/frank/raspi/sysroot/usr/include/glib-2.0 -I/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include QT_LIBS_PULSEAUDIO = -L/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf -lpulse-mainloop-glib -lpulse -lglib-2.0 QMAKE_INCDIR_OPENGL_ES2 =  QMAKE_LIBDIR_OPENGL_ES2 =  "/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf" QMAKE_LIBS_OPENGL_ES2 =  "-lGLESv2" QMAKE_CFLAGS_OPENGL_ES2 =  QMAKE_CFLAGS_FONTCONFIG = -I/home/frank/raspi/sysroot/usr/include/freetype2 QMAKE_LIBS_FONTCONFIG = -L/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf -lfontconfig -lfreetype QMAKE_INCDIR_LIBUDEV =  QMAKE_LIBS_LIBUDEV = -L/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf -ludev QMAKE_INCDIR_XKBCOMMON_EVDEV =  QMAKE_LIBS_XKBCOMMON_EVDEV = -L/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf -lxkbcommon QMAKE_LIBINPUT_VERSION_MAJOR = 0 QMAKE_LIBINPUT_VERSION_MINOR = 6 QMAKE_INCDIR_LIBINPUT =  QMAKE_LIBS_LIBINPUT = -L/home/frank/raspi/sysroot/usr/lib/arm-linux-gnueabihf -linput QMAKE_X11_PREFIX = /usr DEFINES += QT_NO_XKB QMAKE_XKB_CONFIG_ROOT = /usr/share/X11/xkb sql-drivers =  sql-plugins =  odbc sqlite sqlite2 tds qmake switches ......... 
    
    Build options:
      Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile cups dbus dbus-linked doubleconversion egl eglfs eglfs_egldevice eglfs_gbm egl_x11 enable_new_dtags evdev eventfd fontconfig full-config gbm getaddrinfo getifaddrs glib gstreamer-0.10 harfbuzz iconv inotify ipv6ifname kms large-config largefile libinput libudev linuxfb medium-config minimal-config mremap mtdev neon opengl opengles2 openssl openvg pcre png poll_ppoll posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib threadsafe-cloexec tslib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-xlib xinput2 xkbcommon-evdev xkbcommon-qt xlib xrender 
      Build parts ............  libs
      Mode ................... release
      Using sanitizer(s)...... none
      Using C++ standard ..... c++11
      Using gold linker....... yes
      Using new DTAGS ........ yes
      Using PCH .............. yes
      Using LTCG ............. no
      Target compiler supports:
        Neon ................. yes
    
    Qt modules and options:
      Qt D-Bus ............... yes (linked to dbus-1)
      Qt Concurrent .......... yes
      Qt GUI ................. yes
      Qt Widgets ............. yes
      Large File ............. yes
      QML debugging .......... yes
      Use system proxies ..... no
    
    Support enabled for:
      Accessibility .......... yes
      ALSA ................... yes
      CUPS ................... yes
      DoubleConversion........ yes (bundled copy)
      Evdev .................. yes
      FontConfig ............. yes
      FreeType ............... yes (system library)
      Glib ................... yes
      GStreamer .............. yes (0.10)
      GTK platformtheme ...... no
      HarfBuzz ............... yes (bundled copy)
      Iconv .................. yes
      ICU .................... no
      Image formats: 
        GIF .................. yes (plugin, using bundled copy)
        JPEG ................. yes (plugin, using system library)
        PNG .................. yes (in QtGui, using system library)
      libinput................ yes
      Logging backends: 
        journald ............... no
        syslog   ............... no
      mtdev .................. yes (system library)
      Networking: 
        getaddrinfo .......... yes
        getifaddrs ........... yes
        IPv6 ifname .......... yes
        libproxy.............. no
        OpenSSL .............. yes (loading libraries at run-time)
      OpenGL / OpenVG: 
        EGL .................. yes
        OpenGL ............... yes (OpenGL ES 2.0+)
        OpenVG ............... yes-auto
      PCRE ................... yes (bundled copy)
      pkg-config ............. yes 
      PulseAudio ............. yes
      QPA backends: 
        DirectFB ............. no
        EGLFS ................ yes
          EGLFS i.MX6 ........ no
          EGLFS i.MX6 Wayland. no
          EGLFS EGLDevice .... yes
          EGLFS GBM .......... yes
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . no
          EGLFS X11 .......... yes
        LinuxFB .............. yes
        Mir client............ no
        XCB .................. yes (system library)
          EGL on X ........... yes
          GLX ................ yes
          MIT-SHM ............ yes
          Xcb-Xlib ........... yes
          Xcursor ............ yes (loaded at runtime)
          Xfixes ............. yes (loaded at runtime)
          Xi2 ................ yes
          Xrandr ............. yes (loaded at runtime)
          Xrender ............ yes
          XKB ................ no
          XShape ............. yes
          XSync .............. yes
      Session management ..... yes
      SQL drivers: 
        DB2 .................. no
        InterBase ............ no
        MySQL ................ no
        OCI .................. no
        ODBC ................. yes (plugin)
        PostgreSQL ........... no
        SQLite 2 ............. yes (plugin)
        SQLite ............... yes (plugin, using bundled copy)
        TDS .................. yes (plugin)
      tslib .................. yes
      udev ................... yes
      xkbcommon-x11........... yes (bundled copy, XKB config root: /usr/share/X11/xkb)
      xkbcommon-evdev......... yes
      zlib ................... yes (system library)
    
    
    NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
    Configure with '-qreal float' to create a build that is binary compatible with 5.1.
    

  • Moderators

    @Vulpecula I don't mean the summary - it does not help. I mean the output of configure when it is being executed.



  • I did the configure command again and paste it to pastebin.


  • Moderators

    @Vulpecula It cannot find header file bcm_host.h:

    checking for eglfs-brcm...
    /home/frank/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/frank/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC  -I. -I/home/frank/raspi/sysroot/opt/vc/include -I/home/frank/raspi/sysroot/opt/vc/include/interface/vcos/pthreads -I/home/frank/raspi/sysroot/opt/vc/include/interface/vmcs_host/linux -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o eglfs-brcm.o eglfs-brcm.cpp
    eglfs-brcm.cpp:42:22: fatal error: bcm_host.h: No such file or directory
    #include <bcm_host.h>
                         ^
    compilation terminated.
    Makefile:552: recipe for target 'eglfs-brcm.o' failed
    make: *** [eglfs-brcm.o] Error 1
    eglfs-brcm disabled.```
    
    Check whether and where it is located in your sysroot and pass the directory containing this header file to configure.


  • @jsulm looks like that you dont have the header files from paspberry pi https://github.com/raspberrypi/firmware/blob/master/opt/vc/include/bcm_host.h



  • Thank you for the hint.

    Because I'm using MiniBian, i had to install libraspberrypi-dev. bcm_host.h is in this package. After the install I synced my raspberry to my development machine and runned the configure command again and the result is as follow:

    EGLFS ................ yes
          EGLFS i.MX6 ........ no
          EGLFS i.MX6 Wayland. no
          EGLFS EGLDevice .... no
          EGLFS GBM .......... yes
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . yes
          EGLFS X11 .......... no
    
    

    Thanks for the hint!! :D


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.