Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?



  • Hello guys,

    Me the Linux newbie is back again.

    So if you look at my previous threads I am trying to make a PDF Viewer for Raspberry Pi and QtWebEngine seems to be the best bet.

    QtWebEngine cannot be compiled on Raspberry Pis because of the lack of RAM.

    So I am trying to cross compile QtWebEngine using this guide, yet the QtWebEngine compilation always gets skipped.

    I am using the following guide, each command the same.
    https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/

    Only difference is that I used the gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf cross compiler.

    ./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm
    

    Yes, the QtWebEngine build got skipped it seems because there is no QtWebEngine folder in qt5pi/include after make and make install.

    What am I missing here?

    EDIT:
    I am building for the Raspberry Pi 4 Model B, 4 GB RAM variant.


  • Lifetime Qt Champion

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi?:

    the QtWebEngine compilation always gets skipped

    Then please check the configure log to see why it is skipped



  • @jsulm said in Cross compiling QtWebEngine for Raspberry Pi?:

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi?:

    the QtWebEngine compilation always gets skipped

    Then please check the configure log to see why it is skipped

    Thank you for the response.
    I did not save the output of the ./configure command to a file so I ran it again, but this time from the guide Qt official Wiki:
    https://wiki.qt.io/RaspberryPi2EGLFS

    ./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v 2>&1 | tee configlog.txt
    

    The output was the following:
    https://pastebin.com/WB9KNkFE

    I am new to Linux so I am unaware why exactly the QtWebEngine was skipped.

    But at the end of the log I can see that,

    Qt WebEngine:
      Embedded build ......................... yes
      Full debug information ................. no
      Pepper Plugins ......................... no
      Printing and PDF ....................... no
      Proprietary Codecs ..................... no
      Spellchecker ........................... yes
      Native Spellchecker .................... no
      WebRTC ................................. no
      Use System Ninja ....................... no
      Geolocation ............................ yes
      WebChannel support ..................... yes
      Use v8 snapshot ........................ yes
      Kerberos Authentication ................ no
      Support qpa-xcb ........................ no
      Building v8 snapshot supported ......... no
      Use ALSA ............................... yes
      Use PulseAudio ......................... yes
      Optional system libraries used:
        re2 .................................. no
        icu .................................. no
        libwebp, libwebpmux and libwebpdemux . no
        opus ................................. no
        ffmpeg ............................... no
        libvpx ............................... no
        snappy ............................... no
        glib ................................. yes
        zlib ................................. yes
        minizip .............................. no
        libevent ............................. no
        jsoncpp .............................. no
        protobuf ............................. no
        libxml2 and libxslt .................. yes
        lcms2 ................................ no
        png .................................. yes
        JPEG ................................. yes
        harfbuzz ............................. yes
        freetype ............................. yes
      Required system libraries:
        fontconfig ........................... yes
        dbus ................................. yes
        nss .................................. no
        khr .................................. yes
        glibc ................................ yes
      Required system libraries for qpa-xcb:
        x11 .................................. no
        libdrm ............................... no
        xcomposite ........................... no
        xcursor .............................. no
        xi ................................... no
        xtst ................................. no
    

    Embedded build is yes, so does that mean it should get built or not?

    Should I also post the output of the make command?

    EDIT: Also, I am building for the Raspberry Pi 4 Model B, 4 GB RAM variant, so is the device option "linux-rasp-pi-g++" correct?


  • Lifetime Qt Champion

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi?:

    Embedded build is yes, so does that mean it should get built or not?

    I guess so, but I'm not sure what "embedded" means here.
    Maybe somebody else knows more about building web engine.

    You also did "make install" after "make"?



  • @jsulm said in Cross compiling QtWebEngine for Raspberry Pi?:

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi?:

    Embedded build is yes, so does that mean it should get built or not?

    I guess so, but I'm not sure what "embedded" means here.
    Maybe somebody else knows more about building web engine.

    You also did "make install" after "make"?

    Yes, I also did a make install after make.
    After doing that I went into the qt5pi folder and there was no QtWebEngine folder anywhere. :(

    Means it probably got skipped.

    Should I run the make command once again and save the output?
    It might tell why the QtWebEngine was skipped during make but not during compile.



  • @jsulm I ran make again and saved the output this time and found the error.

    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.
    

    What does the first statement mean?
    Should I try with "-no-webengine-v8-snapshot" in the configure statement?

    But I do not want to lose the ability QtWebEngine to open PDFs.



  • @jsulm

    Embedded here means that it's building for an embedded device, in my case, the Raspberry Pi.

    And I just had a realization that the Pepper Plugins are not going to get built which is what I need for opening PDFs in the QtWebEngine.

    How can I enable Pepper Plugins on embedded devices?


  • Lifetime Qt Champion

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?:

    How can I enable Pepper Plugins on embedded devices?

    Check configure log (config.log) to see why it was not enabled. I guess some dependencies are missing.


  • Lifetime Qt Champion

    Hi,

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?:

    Required system libraries:
    fontconfig ........................... yes
    dbus ................................. yes
    nss .................................. no
    khr .................................. yes
    glibc ................................ yes

    There's a no there in the middle for the required system libraries.



  • @jsulm said in Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?:

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?:

    How can I enable Pepper Plugins on embedded devices?

    Check configure log (config.log) to see why it was not enabled. I guess some dependencies are missing.

    I checked, there is no mention of the word "Pepper" anywhere, except when saying it won't be built.

    @SGaist said in Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?:

    Hi,

    @lolcocks said in Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?:

    Required system libraries:
    fontconfig ........................... yes
    dbus ................................. yes
    nss .................................. no
    khr .................................. yes
    glibc ................................ yes

    There's a no there in the middle for the required system libraries.

    Ohhhh..... I totally missed that. (Sorry, first time building anything).
    I will go and try to make it a yes and try to compile again.

    But is that the one required for Pepper Plugins? Or is it one of the optional ones?

    Thank you so much for helping me out.



  • @SGaist ,

    I just turned the nss into yes, but Pepper Plugins is still a no.

    I see a lot of optional packages as no, maybe one of those is required for Pepper Plugins?
    Some of these might not be even available on Raspian Buster. I might have to compile them from source.

    How can I find out which library is required for Pepper Plugins?


  • Lifetime Qt Champion

    I don't know all the dependencies for QtWebEngine. You should read the test logs to see why the Pepper Plugin test fails.



  • @SGaist said in Cross compiling QtWebEngine for Raspberry Pi with Pepper Plugins?:

    I don't know all the dependencies for QtWebEngine. You should read the test logs to see why the Pepper Plugin test fails.

    There's no mention of the word "Pepper" anywhere in the logs except when it says that it won't be built. :(



  • @jsulm @SGaist

    Doesn't matter what I do, Pepper Plugins is always a no.
    I tried various versions of the configure command, still the same.

    I did a cross verification for the configure command for Linux (x86) and Raspberry Pi,

    Even the optional system libraries used and required system libraries are exactly the same. Yet, Pepper Plugins will get built for Ubuntu but won't get cross compiled.

    What is qpa-xcp? It's libraries are always a no. What is its purpose? Maybe that's the missing key


  • Lifetime Qt Champion

    It's the backend to run Qt application using a X11 server.


Log in to reply