Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Building Qt 5.3 Alpha on Mac: webkitwidgets and webkit built successfully, but are unavailable
This is the error message I get:
bq. Unknown module(s) in QT: webkitwidgets webkit
How can I fix this this problem? I swear I've seen Webkit being built! At least, some parts of it, v8 and such. In fact, that's what took the most of the day. Why do I get this error and how to fix it?
This is how I've configured Qt:
bq. ./configure -c++11 -no-qml-debug -no-openssl -nomake examples -nomake tests -no-cups -no-icu -no-xcb -opengl desktop
There are indeed files qtwebkit/lib/QtWebKit.framework and QtWebKitWidgets.framework
Any advice please? The problem is that qmake doesn't acknowledge I do have webkit. Where does it get a list of available Qt modules?
Qt WebKit requires ICU and Ruby: http://qt-project.org/wiki/Building_Qt_5_from_Git
Just to reiterate: I've built QtWebkit successfully - without ICU and Ruby. In fact, I've configured Qt with -no-icu, and I still got QtWebkit framework built. Are you saying it's non-functional and that's why it is not detected by qmake? I think building QtWebkit took more than half the total time to build Qt.
How do you get that error message?
Do you run examples or trying to build something using the modules?
Take a look on the installation directory Qt_install_root/lib and verify that you have QtWebkit framework installed and it contains something.
QtWebKit.framework is far from empty, 183.4 MB. It is located at the correct path.
I get this error when running qmake on a .pro file that has QT += webkit
Mac OS X requires some additional steps to be done if you build it by yourself.
What does otool -L shows?
otool -L /Qt_install_root/lib/QtWebKit.framework/QtWebKit
if it does not show correct path to QtWebKit then you need to modify it using install_name_tool
install_name_tool -change QtWidgets.framework/Versions/5/QtWidgets /Qt_install_root/lib/QtWidgets.framework/Versions/5/QtWidgets /Qt_install_root/lib/QtWidgets.framework/Versions/5/QtWidgets
The same steps need to be done for all shared libraries.
"Qt for Mac OS X - Deployment":http://qt-project.org/doc/qt-5/macosx-deployment.html gives more details on it.
Thanks for the advice, but I don't see anything wrong here:
bq. otool -L /usr/local/Qt-5.3.0/lib/QtWebKit.framework/QtWebKit
/usr/local/Qt-5.3.0/lib/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.0, current version 5.3.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1265.0.0)
/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
/usr/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.26.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.11.0)
/usr/lib/libsqlite3.dylib (compatibility version 9.0.0, current version 158.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 51.1.0)
/usr/local/Qt-5.3.0/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtPositioning.framework/Versions/5/QtPositioning (compatibility version 5.3.0, current version 5.3.0)
/usr/local/Qt-5.3.0/lib/QtSensors.framework/Versions/5/QtSensors (compatibility version 5.3.0, current version 5.3.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1056.0.0)
I want to stress that my application uses core, gui, network, script, opengl, widgets and webkit components, of which webkit is the only problematic one. If I remove webkit dependency from the application, I can build and run it no problem.
Is it possible that you have another version of Qt without webkit and you run qmake from that Qt?
No, I don't believe so. i've got 3 versions of Qt, of which all have webkit. Plus, I'm running qmake from Qt Creator where I have 3 kits configured, so I'm pretty sure I've got the right qmake.
Try to run qmake manually with -d option
qmake -d -recursive your_sources_dir
It will produce a lot of info
And just to be sure run qmake -v to verify that you are calling qmake from correct Qt.
If I run qmake manually from an arbitrary dir, I will get qmake for 4.8.5 which, apparently, I have in PATH and I need to preserve this behaviour. In Qt creator, I have all my 3 Qt versions configured, and I have manually pointed each to the right qmake.
Aha! It was a problem with qmake. It was the right qmake, but I was using a copy located elsewhere. Once I pointed to the same qmake in /usr/local/Qt-5.3.../bin, it all started working. Thanks!