How to build Qt 5.4 statically on Window 7. Compression exe by upx
-
I improved my instruction. You don't need reinstall Qt. You need save the backup copy of the "qmake.conf" and the "Src" folder
-
What if the src folder is missing like in my case where there are no src folder?
-
Nevermind.. I installed som add ons and it suddently apperead in my Qt folder.
-
[quote author="Cannabis2011" date="1419182935"]What if the src folder is missing like in my case where there are no src folder?[/quote]
See the picture: http://i9.pixs.ru/storage/2/1/1/QtSourcepn_3760970_15267211.png
-
That was exactly what i did :-D
-
Please, help me!
I want to build Qt statically on Linux Mint 13. This is my steps:
After I instaled Linux Mint 13 I ran this command:
bq. sudo apt-get install build-essential ^libxcb.* libx11-xcb-dev libglu1-mesa-dev libxrender-dev libfontconfig1-dev
Then I moved to Src directory and ran:
bq. ./configure -prefix "/home/ivan/Qt5.4.0_Static" -static -platform linux-g++ -release -opensource -confirm-license -fontconfig -no-compile-examples -nomake examples -nomake tests -nomake tools -opengl desktop -qt-sql-sqlite -make libs -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype
I received:
@Configure summary
Build type: linux-g++ (i386, CPU features: none detected)
Build options:
Configuration .......... accessibility accessibility-atspi-bridge audio-backend avx c++11 clock-gettime clock-monotonic concurrent evdev eventfd fontconfig full-config getaddrinfo getifaddrs gif harfbuzz iconv inotify ipv6ifname jpeg large-config largefile linuxfb medium-config minimal-config mremap nis opengl pcre png posix_fallocate precompile_header qpa qpa reduce_exports reduce_relocations release rpath small-config sse2 sse3 sse4_1 sse4_2 ssse3 static system-freetype xcb xcb-glx xcb-plugin xcb-render xcb-xlib xkbcommon-qt xlib xrender zlib
Build parts ............ libs
Mode ................... release
Using C++11 ............ yes
Using gold linker....... no
Using PCH .............. yes
Target compiler supports:
SSE2/SSE3/SSSE3 ...... yes/yes/yes
SSE4.1/SSE4.2 ........ yes/yes
AVX/AVX2 ............. yes/noQt modules and options:
Qt D-Bus ............... runtime
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... yes
Use system proxies ..... noSupport enabled for:
Accessibility .......... yes
ALSA ................... no
CUPS ................... no
Evdev .................. yes
FontConfig ............. yes
FreeType ............... yes (system library)
Glib ................... no
GTK theme .............. no
HarfBuzz ............... yes (bundled copy)
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (in QtGui, using bundled copy)
JPEG ................. yes (in QtGui, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
OpenSSL .............. no
NIS .................... yes
OpenGL / OpenVG:
EGL .................. no
OpenGL ............... desktop
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ no
KMS .................. no
LinuxFB .............. yes
XCB .................. yes (system library)
EGL on X ........... no
GLX ................ yes
MIT-SHM ............ yes
Xcb-Xlib ........... yes
Xcursor ............ yes (loaded at runtime)
Xfixes ............. yes (loaded at runtime)
Xi ................. yes (loaded at runtime)
Xi2 ................ no
Xinerama ........... yes (loaded at runtime)
Xrandr ............. yes (loaded at runtime)
Xrender ............ yes
XKB ................ no
XShape ............. yes
XSync .............. yes
XVideo ............. yes
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... qt-qt
TDS .................. no
udev ................... no
xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
zlib ................... yes (bundled copy)WARNING: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.
Info: creating super cache file /home/ivan/Qt5.4.0/5.4/Src/.qmake.superQt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /home/ivan/Qt5.4.0_StaticPrior to reconfiguration, make sure you remove any leftovers from
the previous build.@I ran the "make" command. But after 20 minites I saw this error: Project ERROR: Unknown module(s) in QT: dbus
@rm -f ../../lib/libQt5Gui.a
mv -f libQt5Gui.a ../../lib/
make[3]: Leaving directory/home/ivan/Qt5.4.0/5.4/Src/qtbase/src/gui' cd platformheaders/ && ( test -e Makefile || /home/ivan/Qt5.4.0/5.4/Src/qtbase/bin/qmake /home/ivan/Qt5.4.0/5.4/Src/qtbase/src/platformheaders/platformheaders.pro -o Makefile ) && make -f Makefile make[3]: Entering directory
/home/ivan/Qt5.4.0/5.4/Src/qtbase/src/platformheaders'
make[3]: Nothing to be done forfirst'. make[3]: Leaving directory
/home/ivan/Qt5.4.0/5.4/Src/qtbase/src/platformheaders'
cd platformsupport/ && ( test -e Makefile || /home/ivan/Qt5.4.0/5.4/Src/qtbase/bin/qmake /home/ivan/Qt5.4.0/5.4/Src/qtbase/src/platformsupport/platformsupport.pro -o Makefile ) && make -f Makefile
Project ERROR: Unknown module(s) in QT: dbus
make[2]: *** [sub-platformsupport-make_first] Error 3
make[2]: Leaving directory/home/ivan/Qt5.4.0/5.4/Src/qtbase/src' make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory
/home/ivan/Qt5.4.0/5.4/Src/qtbase'
make: *** [module-qtbase-make_first] Error 2@ -
Hello...can u tell the procedure for Qt5.5 statically on windows 7
-
Hello, i made all things how you said. The diffrence is only, i used Qt 5.3.2, Qt creator 3.2.1 and mingw...4.8.2.
Windows 7 ProfessionalI get some failure and I don't unterstand where they from.
YarrInterpreter.cpp:-1: Fehler: undefined reference to `JSC::Yarr::newlineCreate()'
YarrInterpreter.cpp:-1: Fehler: undefined reference to `JSC::Yarr::wordcharCreate()'
C:/Qt/Qt5.4.0_Static/lib/libQt5Qml.a(YarrInterpreter.o): bad reloc address 0x12 in section `.text$_ZN3WTF15BumpPointerPool6createEj[__ZN3WTF15BumpPointerPool6createEj]'
collect2.exe:-1: failure: error: ld returned 1 exit Status
can someone help me?
-
Hi and welcome to devnet,
IIRC, this comes from mis-generated files. You are probably missing python in your PATH
-
@SGaist
how can i repair this?Python is allready installed at --> "C:\Python34"
and Qt with static build is installed at --> "D:\sw_tools\Qt"What have i to do?
All failure during the mingw32-make and mingw32-make install which are mentioned by 8Observer8 are the same.
failure mingw32-make installAnother question is there a diffrence to use mingw which was installed with Qt or have I to use another Installation of mingw?
Thanks a lot for your help.
-
Re-run configure and restart the build
-
How did you modify PATH to include python ? Also, did you do a full rebuild ?
-
I don't modified any paths...
How above said, i modified only the qmake, made a backup of Src, start a configure --> mingw32-make and install
Than i undo the changes and set the kit...
By set the Qt Version and kit i get a yellow warning ...EDIT: @SGaist Thanks a lot!
I solved my Problem.
You have to include the path to python before configure your qmake.conf
so what i do:- modifed qmake.conf how mentioned by 8Observer8
- Start "Qt 5.4.0 for Desktop (MinGW 4.9 32 bit)"
- cd C:\Qt\Qt5.4.0\5.4\Src\
- now set the path to python.exe my Looks like --> C:\Python34
--> Print in the console --> set PATH=C:\Python34;%PATH% - choose your configuration and follow the instruction of 8Observer8
EDIT:
If you are going to compile one of your old projects, don't forget to remove the "*.pro.user" file otherwise there will be a failure with qmlimportscanner.exe