Cross Compile Qtwebengine for Raspberry Pi 2
A Former User last edited by A Former User
I am trying to cross compile Qtwebengine module from Ubuntu 14.04 LTS targeting raspberry pi 2.
I have already cross compiled Qt5.6 successfully on Pi and examples work fine.
I used the following link for cross compilation:
[http://wiki.qt.io/RaspberryPi2EGLFS ](link url)
After building qtbase, while trying to build qtwebengine part, I get the error shown below. I used the same qmake for qtbase and it worked.
~/raspi/qt5/bin/qmake -r $ /home/gesar/pi-qt5.6/raspi/qt5/bin/qmake -r Cannot read /home/gesar/opt/qt-everywhere-opensource-src-5.6.0/qtwebengine/mkspecs/modules-inst/qt_lib_webenginecoreheaders_private.pri: No such file or directory Reading /home/gesar/pi-qt5.6/raspi/qtwebengine/src/src.pro /home/gesar/pi-qt5.6/raspi/qtwebengine/src/src.pro:20: 'isQMLTestSupportApiEnabled' is not a recognized test function. Reading /home/gesar/pi-qt5.6/raspi/qtwebengine/src/core/core.pro Reading /home/gesar/pi-qt5.6/raspi/qtwebengine/src/core/core_headers.pro Project WARNING: You should probably load(qt_build_config) first in core_headers.pro for QtWebEngineCore, as the latter also load()s qt_module. Project MESSAGE: Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file. Project MESSAGE: Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing. Project ERROR: Module does not define version.
- First I tried with porting qt5.5.1 libraries along with qtwebkit.
- Qt5.5.1 - qtbase was successfully installed but then qtwebkit didn't.
- It was given various errors related to missing ICU libraries. I was not able to enable ICU at all during the configuration.
- Tried this for more than a week with different configurations and dependencies following different suggestions from this forum and stackoverflow.
- Finally, decided to move to Qt5.6 with Qtwebengine.
- This is where I am now.
My project description:
I am working on a HTML5 based app to be deployed on Raspberry Pi. This needs qtwebkit or qtwebengine
Can anyone please provide me instructions to cross compile QtWebengine for Raspberry Pi?
The error that I get (pasted in the previous post) says that
qtwebengine/mkspecs/modules-inst/qt_lib_webenginecoreheaders_private.pri: No such file or directory
However, this files does exist in that location. So, don't understand why it can't find it ???
I managed to get over the previous error and now getting the following build error:
libcap development package appears to be missing
Full excerpts of the build is
$ /home/gesar/pi-qt5.6/raspi/qt5/bin/qmake Info: creating cache file /home/gesar/pi-qt5.6/raspi/qtwebengine/.qmake.cache Running configure tests Checking for khr... yes Checking for libcap... no Checking for snappy... no Checking for srtp... no System zlib or minizip not found. Using Chromium's copies. System libwebp or libwebpdemux not found. Using Chromium's copies. System libevent not found. Using Chromium's copy. System jsoncpp not found. Using Chromium's copy. System opus not found. Using Chromium's copy. System vpx >= 1.4 not found. Using Chromium's copy. System libsrtp not found. Using Chromium's copy. System snappy not found. Using Chromium's copy. Certificate handling.............. Using bundled BoringSSL ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu) FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg) Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_proprietary_codecs) libcap development package appears to be missing QtWebEngine will not be built.
I managed to get over the previous error messages by installing qtwebchannel, qtdeclarative, qtquickcontrols2, qtconnectivity before trying with qtwebengine.
This way the qmake went a long way and then terminated with the following error message:
..... .... .obj/qquickwebengineview.o:qquickwebengineview.cpp:function QQuickWebEngineView::webChannel(): error: undefined reference to 'QQmlWebChannel::QQmlWebChannel(QObject*)' collect2: error: ld returned 1 exit status make: *** [../../lib/libQt5WebEngine.so.5.6.1] Error 1 make: Leaving directory `/home/gesar/pi-qt5.6/raspi/qtwebengine/src/webengine' make: *** [sub-webengine-install_subtargets] Error 2 make: Leaving directory `/home/gesar/pi-qt5.6/raspi/qtwebengine/src' make: *** [sub-src-install_subtargets] Error 2
Has anyone got a clue?
Zevero last edited by
Maybe you need qtxmlpatterns as well? I always compiled it and it works for qtwebengine 5.8 and 5.9. My current problem is, that mouse interaction with the browser does not work (only keyboard)...
fachro last edited by
@Zevero I had the same problem, is there a solution for the mouse click that doesn't work in the web pages.