PDA

View Full Version : How to build Qt statically on Linux Mint 13 and Ununtu



8Observer8
11th January 2015, 05:16
Hello

I want to build Qt staticlly on Linux Mint 13. This is my steps:

After I instaled Linux Mint 13. I ran this command:

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:

./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/no

Qt 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 ..... no

Support 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.super

Qt 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_Static

Prior 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 for `first'.
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