Compile with -no-opengl makes errors with webgl modules
-
wrote on 9 Jan 2018, 07:48 last edited by
Hello,
I'm trying to compile qt 5.10 on windows with vs2017. When I'm compiling with -no-opengl I get compile errors about webgl. However when looking at configure.bat -h I can't see how to exclude webgl specifically. Can someone advise ? Also is there a gmake cleanconf equivalent for nmake ? I can't find it.Cheers,
Gerhard -
Hi,
You’ll likely have to modify the plugin .pro file to disable its build when you pass the -no-opengl option.
-
wrote on 10 Jan 2018, 17:14 last edited by Crashdog 1 Oct 2018, 17:20
Hello,
Sorry, I don't get it. There are quite a few plugin.pro files.
This is my configure:
configure.bat -static -release -no-opengl -platform win32-msvc -opensource -confirm-license -prefix d:\qt\qt5.10and this is the error that I get from the compiler (excerpt, the complete error is pritty long):
cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -O2 -MD -utf-8 /wd4530 /wd4577 -W3 -w341
0 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -DUNICODE -D_UNICODE -DWIN32 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -DQT_NO_DEBU
-DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_WEBSOCKET
_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -I. -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\Q
EventDispatcherSupport -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtEventDispatcherSupport\5.10.0 -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtEventD
spatcherSupport\5.10.0\QtEventDispatcherSupport -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtFontDatabaseSupport -ID:\QT\qt-everywhere-src-5.10.0\qtbase\i
clude\QtFontDatabaseSupport\5.10.0 -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtFontDatabaseSupport\5.10.0\QtFontDatabaseSupport -ID:\QT\qt-everywhere-src
5.10.0\qtbase\include\QtThemeSupport -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtThemeSupport\5.10.0 -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtTh
meSupport\5.10.0\QtThemeSupport -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtGui\5.10.0 -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtGui\5.10.0\QtGui
-ID:\QT\qt-everywhere-src-5.10.0\qtdeclarative\include -ID:\QT\qt-everywhere-src-5.10.0\qtdeclarative\include\QtQuick -ID:\QT\qt-everywhere-src-5.10.0\qtbase\i
clude\QtGui -ID:\QT\qt-everywhere-src-5.10.0\qtwebsockets\include -ID:\QT\qt-everywhere-src-5.10.0\qtwebsockets\include\QtWebSockets -ID:\QT\qt-everywhere-src-
.10.0\qtdeclarative\include\QtQml -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtNetwork -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtCore\5.10.0 -ID:
T\qt-everywhere-src-5.10.0\qtbase\include\QtCore\5.10.0\QtCore -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtCore -I.moc\release -ID:\QT\qt-everywhere-src-
.10.0\qtbase\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\a41441\AppData\Local\Temp\2\nmCCCC.tmp
qwebglcontext.cpp
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(41): error C2504: 'QPlatformOpenGLContext': base class undefined
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(43): error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(43): error C2143: syntax error: missing ',' before '&'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(46): error C3646: 'format': unknown override specifier
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(46): error C2059: syntax error: '('
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(46): error C2238: unexpected token(s) preceding ';'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(48): error C2061: syntax error: identifier 'QPlatformSurface'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(50): error C2061: syntax error: identifier 'QPlatformSurface'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(58): error C2143: syntax error: missing ';' before '*'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(58): error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(58): error C2238: unexpected token(s) preceding ';'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(61): error C3646: 'queryValue': unknown override specifier
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(61): error C2062: type 'int' unexpected
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(61): error C2238: unexpected token(s) preceding ';'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(66): error C2143: syntax error: missing ';' before '<'
d:\qt\qt-everywhere-src-5.10.0\qtwebglplugin\src\plugins\platforms\webgl\qwebglcontext.h(66): error C4430: missing type specifier - int assumed. Note: C++ doesAssuming that qwebglcontext.cpp causes the problem I can see a plugin.pro in this directory :
D:\QT\qt-everywhere-src-5.10.0\qtwebengine\src\webengine\plugin
again assuming that the error is related to qtwebengine using OpenGL somehow.
The content of the pro file is :
CXX_MODULE = qml
TARGET = qtwebengineplugin
TARGETPATH = QtWebEngine
IMPORT_VERSION = 1.6QT += webengine qml quick
QT_PRIVATE += webengine-privateINCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/core/api $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api $$QTWEBENGINE_ROOT/include/QtWebEngine
SOURCES = plugin.cpp
load(qml_plugin)
But I'm not sure what to alter in that respect.
If I don't use -no-opengl I get other opengl related compiler errors. Since I don't need any opengl support in this project, I though just leave it out.I'm problably on a totally wrong path here ?
Regards,
Gerhard
-
Lifetime Qt Championwrote on 10 Jan 2018, 20:43 last edited by SGaist 1 Oct 2018, 20:43
My bad, I've mixed this one with a platform plugin in Qt base.
Just move the qtwebglplugin folder outside of Qt's source before you call configure and you should be able to go further.
-
wrote on 12 Jan 2018, 09:00 last edited by
Thank you for that tip, it helped... however the next problem came some hour compiling later. I also added -nomake examples to configure.bat so strange that I get this error with qrc_demo.cpp ? I guess I have to remove some more solters ?
D:\QT\qt-everywhere-src-5.10.0\qtbase\bin\rcc.exe -name demo demo.qrc -o .rcc\release\qrc_demo.cpp cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -O2 -MD -utf-8 /wd4530 /wd4577 -W3 -w3410
0 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -DUNICODE -D_UNICODE -DWIN32 -DMAIN_QML="Basic.qml" -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_QUICK_LIB
-DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -I. -ID:\QT\qt-everywhere-src-5.10.0\qtdeclarative\include -ID:
QT\qt-everywhere-src-5.10.0\qtdeclarative\include\QtQuick -ID:\QT\qt-everywhere-src-5.10.0\qtsvg\include -ID:\QT\qt-everywhere-src-5.10.0\qtsvg\include\QtSvg -I
D:\QT\qt-everywhere-src-5.10.0\qtbase\include -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtWidgets -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtGui -I
D:\QT\qt-everywhere-src-5.10.0\qtdeclarative\include\QtQml -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtNetwork -ID:\QT\qt-everywhere-src-5.10.0\qtbase\inc
lude\QtCore -I.moc\release -ID:\QT\qt-everywhere-src-5.10.0\qtbase\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\a41441\AppData\Local\Temp\2\nm8DD9.tmp
main.cpp
basic_plugin_import.cpp
basic_qml_plugin_import.cpp
Generating Code...
cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -O2 -MD -utf-8 /wd4530 /wd4577 -W3 -w3410
0 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -DUNICODE -D_UNICODE -DWIN32 -DMAIN_QML="Basic.qml" -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_QUICK_LIB
-DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -I. -ID:\QT\qt-everywhere-src-5.10.0\qtdeclarative\include -ID:
QT\qt-everywhere-src-5.10.0\qtdeclarative\include\QtQuick -ID:\QT\qt-everywhere-src-5.10.0\qtsvg\include -ID:\QT\qt-everywhere-src-5.10.0\qtsvg\include\QtSvg -I
D:\QT\qt-everywhere-src-5.10.0\qtbase\include -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtWidgets -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtGui -I
D:\QT\qt-everywhere-src-5.10.0\qtdeclarative\include\QtQml -ID:\QT\qt-everywhere-src-5.10.0\qtbase\include\QtNetwork -ID:\QT\qt-everywhere-src-5.10.0\qtbase\inc
lude\QtCore -I.moc\release -ID:\QT\qt-everywhere-src-5.10.0\qtbase\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\a41441\AppData\Local\Temp\2\nmA76D.tmp
qrc_demo.cpp
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' versio
n='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /MANIFEST:embed /OUT:release\basic.exe @C:\Users\a41441\AppData\Local\Temp
\2\nmA868.tmp
Creating library release\basic.lib and object release\basic.exp
qtvirtualkeyboardplugin.lib(plugin.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QtQuickLayoutsPlugin(vo
id)" (?qt_static_plugin_QtQuickLayoutsPlugin@@YA?BUQStaticPlugin@@XZ) referenced in function "public: virtual class QPlatformInputContext * __thiscall QVirtualK
eyboardPlugin::create(class QString const &,class QStringList const &)" (?create@QVirtualKeyboardPlugin@@UAEPAVQPlatformInputContext@@ABVQString@@ABVQStringList
@@@Z)
qtvirtualkeyboardplugin.lib(plugin.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QmlFolderListModelPlugi
n(void)" (?qt_static_plugin_QmlFolderListModelPlugin@@YA?BUQStaticPlugin@@XZ) referenced in function "public: virtual class QPlatformInputContext * __thiscall Q
VirtualKeyboardPlugin::create(class QString const &,class QStringList const &)" (?create@QVirtualKeyboardPlugin@@UAEPAVQPlatformInputContext@@ABVQString@@ABVQSt
ringList@@@Z)
qtvirtualkeyboardplugin.lib(plugin.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QtVirtualKeyboardStyles
Plugin(void)" (?qt_static_plugin_QtVirtualKeyboardStylesPlugin@@YA?BUQStaticPlugin@@XZ) referenced in function "public: virtual class QPlatformInputContext * __
thiscall QVirtualKeyboardPlugin::create(class QString const &,class QStringList const &)" (?create@QVirtualKeyboardPlugin@@UAEPAVQPlatformInputContext@@ABVQStri
ng@@ABVQStringList@@@Z)
release\basic.exe : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\link.EXE"' : return code
'0x460'
Stop.
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.exe"' : return cod
e '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.D:\QT\qt-everywhere-src-5.10.0>
-
Did you restart from scratch after adding that ? You should also add
-nomake tests
-
wrote on 14 Jan 2018, 10:40 last edited by Crashdog
ok, so this is my last try... running into time constrains trying to compile this for a week now.
So i deleted all the folders and re-extracted qt-everywhere-src-5.10.0.zip
I removed following directories:
qtmultimedia
qtwebglplugin
qtvirualkeyboard
qtgamepad
Those cause compile problems.
now running:
configure.bat -static -release -no-opengl -platform win32-msvc -opensource -confirm-license -nomake tests -prefix d:\qt\qt5.10
then
nmakeIt usually takses about 4 hours of compiling before the errors occured. So let's see in 4 hours what happens.
I don't wanna rant but, why can't they deliver static libraries with the distribution in the first place ? and if you have to compile it your self then why not at least deliver a guide on how to do it... the one I pointed to earlier doesn't work. I know this is the community version and free but if it's that painfull to use... I can't sell it to my superiors to buy a commecial license. I'll just probably have to use VS 2017 and windows native stuff.
[Edit]: OK, above description worked. I guess it's important to delete the qt directory first and start from a fresh zip file extract. Still havent found a nmake clearconf. Guess deleting the folder is the Windows way to clear everything.
-
Because:
- Licensing constraints. LGLP requires that your library/application users can switch to a different version of Qt (or any other LGPL dependency you have) how they see fit. Which means that if you want to use a static build of Qt you have to provide all the object files of your library/application to whoever asks you and that for each version of your library/application you released. It's your responsibility to abide by these constrains.
- Human and infrastructure constraints.
- The CI is already under high pressure as it is running for the LTS, the current release branch and dev.
- The CI generates pre-built package for iOS, macOS, Android (arm and x86 IIRC), Linux 64bit, and MinGW, VS2015, VS2017 for Windows. All in debug and release versions.
- Each of these packages are tested by actual people.
- The number of possible configuration option permutations makes it impossible to test absolutely every possible combination. See number two for reasons.
If you want to avoid as much trouble as possible, only build the modules that you are actually going to use. It's faster in any case.
That's why I write time and again: use out of source builds. This way you just have to nuke the folder and start from scratch quickly. That is valid for all platforms.
1/8