Qt 4.8.1 crashes on static build...
I've been testing out multiple configurations for building Qt, I've never tried to build Qt as a static library before, I thought it would be kind of transparent, just some tweaking on the configure command and that's it (I'm testing multiple build configurations to master building Qt under multiple environments and settings), but I'm getting the next error apparently on WebKit tests project:
tst_qwebframe.cpp(68): Warning: Property declaration writeOnlyProperty has no READ accessor function. The property will be invalid.
cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996 -Zi -MDd -MP -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DNDEBUG -DBUILDING_QT__=1 -DTESTS_SOURCE_DIR="D:/qt/4.8.1/src/3rdparty/webkit/Source/WebKit/qt/tests/" -DQT_DECLARATIVE_LIB -DQT_WEBKIT_LIB -DQT_TESTLIB_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"................\include\QtCore" -I"................\include\QtNetwork" -I"................\include\QtGui" -I"................\include\QtTest" -I"................\include\QtWebKit" -I"................\include\QtDeclarative" -I"................\include" -I"c:\OpenSSL-Win32\include" -I"....\tests" -I"....\Api" -I"........\WebCore" -I"..........\Source" -I"..........\include" -I"........\include\QtWebKit" -I"........\include" -I"................\include\ActiveQt" -I"tmp\moc\debug_static" -I"................\mkspecs\win32-msvc2010" -Fotmp\obj\debug_static\ @C:\Users\Raul\AppData\Local\Temp\tst_qwebframe.obj.14012.359.jom
link /LIBPATH:"d:\qt\4.8.1\lib" /LIBPATH:"d:\qt\4.8.1\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='184.108.40.206' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /MANIFEST /MANIFESTFILE:"tmp\obj\debug_static\tst_qwebframe.intermediate.manifest" /OUT:debug\tst_qwebframe.exe @C:\Users\Raul\AppData\Local\Temp\tst_qwebframe.exe.14012.2559.jom
LINK : fatal error LNK1104: cannot open file '../../WebCore/debug\webcore.lib'
command failed with exit code 1104
command failed with exit code 2
At the last statement, it says that cannot open the webcore.lib, but I searched the folder and the file is there (quite heavy btw) and I run the cmd prompt as administrator, so I know it has user permissions.
I searched the whole project files, and I actually don't see a reference anywhere to webcore.lib, so I don't know where that comes from.
Now, my configuration command is:
configure -platform win32-msvc2010 -debug-and-release -opensource -static -mp -qt-sql-sqlite -qt-zlib -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -plugin-manifests -qmake -phonon -multimedia -webkit -script -scripttools -declarative -declarative-debug -arch windows -qt-style-windows -qt-style-windowsxp -qt-style-windowsvista -qt-style-plastique -qt-style-cleanlooks -qt-style-motif -qt-style-cde -no-qt3support -openssl-linked -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib\VC\static
And my platform is windows 7 x64, but I'm using MSVC2010 with the x86 compiler (as I'm aware that sometimes Qt has some issues building x64 on windows).
Can anyone help me please?
Static builds of webkit on Qt are not supported - therefore I doubt anyone can help you here...
Ok then, so I will stop trying to build it statically... I wanted to test as well the fact that Qt Commercial says that supports static Qt builds, I wanted to see if that's true, if Qt can actually be statically built, as some time ago I tried that and building in windows x64 as well, and I wasn't able to.
Trying to see if I was able to do some tweaking and actually achieve it now, but I guess it's not possible, maybe it's a Qt limitation, or the commercial Qt has lots of code that is not being contributed back to the community.
I've never played around with the build parameters before, and wanted to see what could be done and couldn't. I actually was able to build the SqlCipher BSD library (a SQLite modified for encryption capabilities) as an sql driver plugin by modifying the SQLite driver plugin, so I wanted to see what else I could do.
In principle, Qt itself can be built statically. But only without webkit. It was stated in the docs somewhere that webkit cannot be built statically. I don't know for the reasons why, and unfortunately that hint vanished from the docs. But I'm really sure, that it was there :)
Thanks for the answer Volker, you're of great help as usual :)
You're welcome. I should try to make a gerrit change request that prints a big, fat warning that webkit is not supported once a static build is enabled :)