记录qt5.15build,qtwebengine过程

解压
xz -d qt-everywhere-src-5.15.0.tar.xz
tar -xvf qt-everywhere-src-5.15.0.tar

---------------------------
安装依赖库

看 https://doc.qt.io/qt-5/qtwebengine-platform-notes.html

https://doc.qt.io/qt-5/linux-requirements.html

configure -confirm-license -opensource -release -shared -fast 
-nomake examples -nomake demos -nomake tests -opengl es2
 

configure 过程中报错

ted. This means that you cannot build the Qt documentation.

Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
On macOS, you can use Homebrew's llvm package.
On Windows, you must set LLVM_INSTALL_DIR to the installation path.

ERROR: Feature 'egl' was enabled, but the pre-condition '(features.opengl || features.openvg) && (features.angle || libs.egl) && (features.dlopen || !config.unix || config.integrity)' failed.

报上面这个错误的话 把opengl es2 改成 opengl 让configure 补全后面的参数, 最终会是 opengl desktop


./configure 后重新编译前,做个清除 。

rm config.cache config.log config.status config.opt

还是建议mkdir build 目录。 然后在build目录执行

../qt-everywhere-src-5.15.0/configure -skip qtconnectivity -no-opengl -skip qt3d -platform linux-g++-32 -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d  
-skip qtcharts -skip qtconnectivity -skip qtdatavis3d 
-skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing \
-skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech 
-skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns 
-skip qtwebchannel -skip qtwebengine -skip qtwebkit
-release -shared
    make
    sudo make install
  看看编译出的qmake 信息
  qmake -v
    
后来单独编译的qtwebchannel 。 就是进入目录qmake qtwebengine.pro
过程中遇到Unknown module(s) in Qt: qml-private quick-private 的情况
经过qq群里咨询网友“叶  落  星  尘”提醒 ,

//=================举例子================
由于qtquick2依赖于qtquick,而quick属于qtdeclarative,所以先编译qtdeclarative

然后再编译我们要的quickcontrols2,步骤一样

//========================================

不要跳过 qtdeclarative 与 qtquickcontrols2
qtdeclarative 里面有quick , 
另外也不要no opengl, qml 在opengl中, 我网上找的一个帖子是这么写的. 

  
../qt-everywhere-src-5.15.0/configure -skip qtconnectivity  -opengl -skip qt3d -platform linux-g++-32 -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d \
-skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia \
-skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -release -shared
上面的是带有webengine的, 并没有单独编译, 当然了,测试webengine时 还得修改,单独编译, 
之后make, 大概 8个小时左右,过程中在编译 qtwebengine\example\quicknanobrowser  里面报错。 
修改/home/oye/qtbuild/build/qtwebengine makefile文件 剔除example相关的内容.
remake. 
over

之后磁盘空间占用也不大 10g 左右。 可能跟我skip 一些模块有关. 

之后 qmake , make qtwebengine\example\quicknanobrowser ,竟然能跑起来。 我也是醉在了这个 webengine的makefile上了。 

之后是运行 html5测试.  看视频。 有好些问题。 后台日志输出。 
3950:13:1223/184409.538181:ERROR:batching_media_log.cc(26)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: no supported streams"}
[3950:1:1223/184409.548244:ERROR:batching_media_log.cc(26)] MediaEvent: PIPELINE_ERROR DEMUXER_ERROR_NO_SUPPORTED_STREAMS
context mismatch in svga_sampler_view_destroy

[3251:3271:1223/183426.125978:ERROR:context_group.cc(181)] ContextResult::kFatalFailure: ES3 is blacklisted/disabled/unsupported by driver.
js: The 'options' directive has been replaced with 'unsafe-inline' and 'unsafe-eval' source expressions for the 'script-src' and 'style-src' directives. Please use those directives instead, as 'options' has no effect.


时不时 还自动关闭...  (lll¬ω¬)接下来才是真正的 口肯石头, 修改qtwebengine内部的函数.........
借用 “叶  落  星  尘”的话“没有谁能打垮我,当然也没有谁会拯救我”.

上一篇:Mven和Gradle 强制刷新本地仓库


下一篇:mysql 在执行写入操作的时候,报错: