Reputation: 11
I'm trying to cross-compile my desktop project to a raspberry pi. My projects uses Qt 5.6, and QtWebEngine. I followed this guide: RaspberryPi2EGLFS It runs without the webengine-using parts, but I cannot use the WebEngine module because I cannot compile it. It gives me this:
gyp: Undefined variable clang_dir in /Users/aeron/raspi/qtwebengine/src/core/core_generated.gyp
gyp: Undefined variable clang_dir in /Users/aeron/raspi/qtwebengine/src/core/resources/resources.gyp
Project ERROR: -- running gyp_qtwebengine failed --
I have already tried to manually insert an empty variable, but these two lines are just the tip of the iceberg.
I get to this error too when I grab the full qt5 repository and try to compile it.
Update
I made some progress. With editing qtwebengine/src/core/config/embedded_linux.pri
I managed to solve the clang_dir problem. I've just added the line clang_dir=0
to the end of the list of the variables.
But there is another problem of the same kind:
gyp: Undefined variable c_sources in /Users/aeron/raspi/qtwebengine/src/3rdparty/chromium/third_party/ffmpeg/ffmpeg.gyp
Project ERROR: -- running gyp_qtwebengine failed --
How can I resolve this? Or how can I turn off the ffmpeg part of the webengine, I don't have plans to use it anyway...
Update 2
Now it think I solved the ffmpeg problem. The way: in the file src/3rdparty/chromium/third_party/ffmpeg/ffmpeg.gyp
I set the use_system_ffmpeg to 1.
Now I have a new problem:
Updating projects from gyp files...
gyp: Dependency '/Users/aeron/raspi/qtwebengine/src/3rdparty/chromium/base/base.gyp:symbolize#host' not found while trying to load target /Users/aeron/raspi/qtwebengine/src/3rdparty/chromium/base/base.gyp:base#host
Project ERROR: -- running gyp_qtwebengine failed --
So it still does not compile.
Upvotes: 0
Views: 1347
Reputation: 51
Probably not what you want to hear, but QWebEngine is not officially supported on the Pi.
From https://doc.qt.io/qt-5/qtwebengine-platform-notes.html#all-platforms
"On Linux, Clang or GCC version 4.7 or later is required. Supported configurations are linux-g++ and linux-clang."
However, I know for a fact, it can be cross-compiled (I did it on Ubuntu 16) for Qt 5.7.1 and Qt5.8.0, but only if you configure for device "linux-rasp-pi2-g++" and not for "linux-rpi3-g++". It CANNOT be built for Qt5.9.0.
Note that Qt5.8.0 has bad OpenGL performance on the Pi. This issue is not present with Qt5.7 or 5.9.
Then again - it is probably too heavy for the Pi anyway.
Upvotes: 0