Solved 5.11.3 static build problem (win10, MinGW730)
-
It's my first static build for qt.
What is happend?
Env:
OS: Win10 Pro X64 1803 17134.523
Qt:
1. QT 5.11.3 MinGW530_32
2. QT 5.11.3 Source
3. MinGW730_32 and 64 tools
Note: Install from Qt installer.Prebuild env setup:
set PATH=C:/Qt/Tools/mingw730_32/bin set PATH=%PATH%;C:/Qt/Tools/mingw730_32/opt/bin;C:\Qt\5.11.3\Src\gnuwin32\bin;C:\WINDOWS\System32;C:\WINDOWS set LANG=en cd C:\Qt\5.11.3\Src
My configure cmd:
configure.bat -static -release -platform win32-g++ -prefix "C:\Qt\5.11.3\mingw73_32_static" -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip webengine -skip webview -skip qt3d
All fine.
But failed when I run
mingw32-make -j9
.qminimalintegration.cpp:53:0: ..\..\..\..\include\QtFontDatabaseSupport\5.11.3/QtFontDatabaseSupport/private/qwindowsfontdatabase_ft_p.h:1:10: fatal error: ../../../../../src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft_p.h: No such file or directory #include "../../../../../src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft_p.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
Hi and welcome to devnet forum
AFAIK it is still the case that the sources delivered with the pre-built versions cannot be used for new compilations. You would need to pull the sources from git or from the archives.
-
@koahnig Thanks for reply.
I was tried build source from http://download.qt.io/official_releases/qt/5.11/5.11.3/single/qt-everywhere-src-5.11.3.tar.xz, the error still happened.
NOTE:
I ready add under code to qtbase/mkspecs/win32-g++/qmake.conf# [QT-STATIC-PATCH] QMAKE_LFLAGS += -static -static-libgcc QMAKE_CFLAGS_RELEASE -= -O2 QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer DEFINES += QT_STATIC_BUILD
-
You need to use the zip archives on windows. tar.xz are for other OSes only.
Furthermore, IIRC there is a problem with static compilations lately. There was an email lately concerning more testing and ensuring the compatibility for static bilds as well. You need to check with Qt Jira for a bug report there.
Also beware of license implications when using static builds.
-
@koahnig
Thanks again.I was tried the .zip source package. The problem still.
Which version can build with static for now?
-
I was solved this problem.
The solution is call configure script and mingw32-make in other directory.
Example:
C:\ - Qt - 5.11.3 - src (extract full source from zip package) - build (run ..\src\configure.bat -static ... and then mingw32-make)