compiling qt webengine fail



  • I have a program written in qt using qtwebengine. When i compile it on linux it works. however when i use the pi cross compiler i get the following message

    Project ERROR: Unknown module(s) in QT: webengine webenginewidget

    The installation went

    i tried to reinstall the qtwebengine using this

    /opt/qt5pi/qt-everywhere-src-5.10.1/qtwebengine$ ../../qt5build/qtbase/bin/qmake -r

    but i get this

    Running configuration tests...
    Checking for alsa... yes
    Checking for bison... yes
    Checking for embedded... yes
    Checking for flex... no
    Checking for gperf... yes
    Checking for host pkg-config... /usr/bin/pkg-config
    Checking for pulseaudio >= 0.9.10... yes
    Checking for python2... /usr/bin/python2
    Checking for d-bus... yes
    Checking for fontconfig... yes
    Checking for glib-2.0 >= 2.32.0... yes
    Checking for glibc > 2.16... yes
    Checking for harfbuzz >= 1.4.2... yes
    Checking for jsoncpp... yes
    Checking for khr... yes
    Checking for libdrm... yes
    Checking for libevent... yes
    Checking for srtp... no
    Checking for libvpx... no
    Checking for libwebp, libwebpmux and libwebpdemux... yes
    Checking for libxml2 and libxslt... yes
    Checking for libxml2 configured with icuuc... yes
    Checking for minizip... yes
    Checking for system ninja... no
    Checking for nss... yes
    Checking for opus... yes
    Checking for libpng >= 1.6.0... yes
    Checking for protobuf... yes
    Checking for protoc... no
    Checking for re2... no
    Checking for snappy... no
    Checking for xcomposite... no
    Checking for xcursor... no
    Checking for xi... no
    Checking for xrandr... no
    Checking for xtst... no
    Checking for zlib... yes
    Checking for host compiler... no
    Done running configuration tests.
    
    Configure summary:
    
    Qt WebEngine:
      Embedded build ......................... yes
      Pepper Plugins ......................... no
      Printing and PDF ....................... no
      Proprietary Codecs ..................... no
      Spellchecker ........................... yes
      Native Spellchecker .................... no
      WebRTC ................................. no
      Use System Ninja ....................... no
      Geolocation ............................ no
      Use v8 snapshot ........................ yes
      Use ALSA ............................... yes
      Use PulseAudio ......................... yes
      Optional system libraries used:
        re2 .................................. no
        icu .................................. no
        libwebp, libwebpmux and libwebpdemux . yes
        opus ................................. yes
        ffmpeg ............................... no
        libvpx ............................... no
        snappy ............................... no
        libsrtp .............................. no
        glib ................................. yes
        zlib ................................. yes
        minizip .............................. yes
        libevent ............................. yes
        jsoncpp .............................. yes
        protobuf ............................. no
        libxml2 and libxslt .................. yes
        lcms2 ................................ no
        png .................................. yes
        harfbuzz ............................. yes
      Required system libraries:
        fontconfig ........................... yes
        dbus ................................. yes
        nss .................................. yes
        khr .................................. yes
        glibc ................................ yes
      Required system libraries for qpa-xcb:
        libdrm ............................... yes
        xcomposite ........................... no
        xcursor .............................. no
        xi ................................... no
        xrandr ............................... no
        xtst ................................. no
    
    Note: Dropped compiler flags '-pthread' when detecting library 'webengine-protobuf'.
    
    WARNING: flex is required to build QtWebEngine.
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/opt/qt5pi/sysroot/usr/local/qt5pi'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
     
    Static builds of QtWebEngine aren't supported.
    QtWebEngine will not be built.
    
    

    what is flex and how to build it?

    thanks



  • I installed the following dependencies

    https://wiki.qt.io/QtWebEngine/How_to_Try

    then i tried downloading the source alone of webengine

    http://www.linuxfromscratch.org/blfs/view/cvs/x/qtwebengine.html

    sherif@sherif-MacBookPro:/opt/qt5pi/qtwebengine-everywhere-src-5.10.1$ ../qt5build/qtbase/qmake/qmake -r
    Info: creating stash file /opt/qt5pi/qtwebengine-everywhere-src-5.10.1/.qmake.stash
    Info: creating cache file /opt/qt5pi/qtwebengine-everywhere-src-5.10.1/.qmake.cache
    
    Running configuration tests...
    Checking for alsa... yes
    Checking for bison... yes
    Checking for embedded... yes
    Checking for flex... yes
    Checking for gperf... yes
    Checking for host pkg-config... /usr/bin/pkg-config
    Checking for pulseaudio >= 0.9.10... yes
    Checking for python2... /usr/bin/python2
    Checking for d-bus... yes
    Checking for fontconfig... yes
    Checking for glib-2.0 >= 2.32.0... yes
    Checking for glibc > 2.16... yes
    Checking for harfbuzz >= 1.4.2... yes
    Checking for jsoncpp... yes
    Checking for khr... yes
    Checking for libdrm... yes
    Checking for libevent... yes
    Checking for srtp... no
    Checking for libvpx... no
    Checking for libwebp, libwebpmux and libwebpdemux... yes
    Checking for libxml2 and libxslt... yes
    Checking for libxml2 configured with icuuc... yes
    Checking for minizip... yes
    Checking for system ninja... yes
    Checking for nss... yes
    Checking for opus... yes
    Checking for libpng >= 1.6.0... yes
    Checking for protobuf... yes
    Checking for protoc... no
    Checking for re2... no
    Checking for snappy... no
    Checking for xcomposite... no
    Checking for xcursor... no
    Checking for xi... no
    Checking for xrandr... no
    Checking for xtst... no
    Checking for zlib... yes
    Checking for host compiler... no
    Done running configuration tests.
    
    Configure summary:
    
    Qt WebEngine:
      Embedded build ......................... yes
      Pepper Plugins ......................... no
      Printing and PDF ....................... no
      Proprietary Codecs ..................... no
      Spellchecker ........................... yes
      Native Spellchecker .................... no
      WebRTC ................................. no
      Use System Ninja ....................... yes
      Geolocation ............................ yes
      Use v8 snapshot ........................ yes
      Use ALSA ............................... yes
      Use PulseAudio ......................... yes
      Optional system libraries used:
        re2 .................................. no
        icu .................................. no
        libwebp, libwebpmux and libwebpdemux . yes
        opus ................................. yes
        ffmpeg ............................... no
        libvpx ............................... no
        snappy ............................... no
        libsrtp .............................. no
        glib ................................. yes
        zlib ................................. yes
        minizip .............................. yes
        libevent ............................. yes
        jsoncpp .............................. yes
        protobuf ............................. no
        libxml2 and libxslt .................. yes
        lcms2 ................................ no
        png .................................. yes
        harfbuzz ............................. yes
      Required system libraries:
        fontconfig ........................... yes
        dbus ................................. yes
        nss .................................. yes
        khr .................................. yes
        glibc ................................ yes
      Required system libraries for qpa-xcb:
        libdrm ............................... yes
        xcomposite ........................... no
        xcursor .............................. no
        xi ................................... no
        xrandr ............................... no
        xtst ................................. no
    
    Note: Dropped compiler flags '-pthread' when detecting library 'webengine-protobuf'.
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/opt/qt5pi/sysroot/usr/local/qt5pi'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
     
    V8 snapshot cannot be built. Most likely, the 32-bit host compiler does not work. Please make sure you have 32-bit devel environment installed, or  configure webengine with '-no-webengine-v8-snapshot'
    QtWebEngine will not be built.
    
    

  • Lifetime Qt Champion

    Hi,

    @SherifOmran said in compiling qt webengine fail:

    xcomposite ........................... no
    xcursor .............................. no
    xi ................................... no
    xrandr ............................... no
    xtst ................................. no

    You are still missing the corresponding development packages as it seems.


  • Moderators

    @SherifOmran
    your configuration seems good so far. What backend you plan to use? For X11 you have to install the packages (armhf @SGaist mentioned

     Required system libraries for qpa-xcb:
        libdrm ............................... yes
        xcomposite ........................... no
        xcursor .............................. no
        xi ................................... no
        xrandr ............................... no
        xtst ................................. no
    

    I had the problem (also especially with Qt 5.10.1) that i only was able to cross compile QtWebEngine with the -no-webengine-v8-snapshot option. There is also a bugreport regarding this IIRC.

    Also your first post shows that you tried to build Qt statically?


Log in to reply
 

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