Mac: Monterey unknown module(s) in QT: webengine
-
I searched the forums for about 45 minutes for an answer.
After "downgrading" to Monterey, I tried compiling Qt 5.15 (ignoring the warning about not being tested). There are many errors (reinterpret_cast<> incorrect, template errors) in Qt 5.x with the latest clang, so changed to 6.2.4 (previously installed under Big Sur.
XCode is installed: 13.2. Command Line tools installed, 13.4.
This is a multi-megabyte, multi-platform GPL project that I am trying to do some small modifications, natively under Monterey. I could back up to High Sierra using VM's, but it should work under Monterey.
Downgrading to CMakeLists.txt is not currently an option: I am unfamiliar with it, I have found errors with it in regards to Qt, I find the QtCreator mis-handling of CMakeLists.txt to be annoying and frustrating. I desire to keep this package backwards compatible as much as possible.
IMO, CMakeLists.txt feels to be a step backwards, however I understand the desire to be like Google and Microsoft. I have used Visual Studio and CMakeLists.txt, see posts at socmaker.com.
QWebEngine IS a part of the Qt install. I even uninstalled and re-installed using the Qt Gui Maintenance tool . qmake continues to fail to find webengine. period.
NOTE: This same project uses web engine on previous Apple Versions (and before that, QtWebKit), and qmake always finds webengine.
I tried the following:
-
Remove and re-install QWebEngine from Qt 6.2.4. (That "succeeded" but did not solve the qmake unknown module(s) error)
-
Tried to install Qt 6.3.0. That failed in the middle of the install. Not sure why. I have 919 gigabytes free, so it is not a resource issue.
Update: Did smallest 6.3.0 install possible, succeeded. 6.3.0 fails with same error at qmake step.
Any suggestions on getting qmake to find webengine?
Thanks!
-
-
Hi and welcome to devnet,
Did you try to build a simple dummy project or one of the example of the module ?
-
@SGaist Just did a dummy pre-generated project with qwebengine.
It failed with same error. (Qt 6.2.4).ugh.
Did the same thing on a MacBook Air, with Monterey installed. Same error. Same environment. Monterey 12.4.
Without qwebengine, it compiles, builds, runs, and I can single step debug.
-
@SGaist I MISSED THAT!
THANKS!
Now in QMake .pro file (after a couple of other decisions)
qwebengine {
message("QWebEngine build")
greaterThan(QT_MAJOR_VERSION,5){
QT += webenginecore webenginewidgets
} else {
QT += webengine webenginewidgets
}
DEFINES += WEBENGINE_USED=1
}else{
#-----------------------------------------------------------------------
# otherwise it is webkit, so include correct qt libs
#-----------------------------------------------------------------------
message("QWebKit build")
DEFINES += WEBKIT_USED=1
QT += webkit webkitwidgets
}