How to build Qt static for Ubuntu?



  • qt-everywhere-opensource-src-5.8.0.tar.gz

    cd ~/Desktop/5.8
    sudo ./configure -static -prefix ~/Desktop/5.8

    • cd qtbase
    • /home/armin/Desktop/5.8/qtbase/configure -top-level -static -prefix /home/armin/Desktop/5.8
      Which edition of Qt do you want to use ?

    Type 'c' if you want to use the Commercial Edition.
    Type 'o' if you want to use the Open Source Edition.

    o

    This is the Qt Open Source Edition.

    You are licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) version 3.
    You are also licensed to use this software under the terms of
    the GNU General Public License (GPL) version 2.

    Type 'L' to view the GNU Lesser General Public License version 3.
    Type 'G' to view the GNU General Public License version 2.
    Type 'yes' to accept this license offer.
    Type 'no' to decline this license offer.

    Do you accept the terms of either license? yes

    Creating qmake...
    .Done.

    Running configuration tests...
    Done running configuration tests.

    Configure summary:

    Build type: x86_64
    Configuration: use_gold_linker sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples enable_new_dtags largefile precompile_header accessibility release c++11 c++14 c++1z concurrent dbus mremap reduce_exports reduce_relocations static stl
    Build options:
    Mode ................................... release
    Building shared libraries .............. no
    Using C++ standard ..................... C++1z
    Using gold linker ...................... yes
    Using new DTAGS ........................ yes
    Using precompiled headers .............. yes
    Using LTCG ............................. no
    Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2
    AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
    Build parts ............................ libs examples tools
    Qt modules and options:
    Qt Concurrent .......................... yes
    Qt D-Bus ............................... yes
    Qt D-Bus directly linked to libdbus .... no
    Qt Gui ................................. yes
    Qt Widgets ............................. yes
    Support enabled for:
    Accessibility .......................... yes
    Using pkg-config ....................... yes
    QML debugging .......................... yes
    udev ................................... no
    Using system zlib ...................... yes
    Qt Core:
    DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
    GLib ................................... yes
    iconv .................................. no
    ICU .................................... yes
    Logging backends:
    journald ............................. no
    syslog ............................... no
    Using system PCRE ...................... yes
    Qt Network:
    getaddrinfo() .......................... yes
    getifaddrs() ........................... yes
    IPv6 ifname ............................ yes
    libproxy ............................... no
    OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
    SCTP ................................... no
    Use system proxies ..................... yes
    Qt Sql:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    OCI (Oracle) ........................... no
    ODBC ................................... no
    PostgreSQL ............................. no
    SQLite2 ................................ no
    SQLite ................................. yes
    Using system provided SQLite ......... no
    TDS (Sybase) ........................... no
    Qt Gui:
    FreeType ............................... yes
    Using system FreeType ................ yes
    HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
    Fontconfig ............................. yes
    Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
    Using system libjpeg ............... no
    PNG .................................. yes
    Using system libpng ................ yes
    OpenGL:
    EGL .................................. no
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    Session Management ..................... yes
    Features used by QPA backends:
    evdev .................................. yes
    libinput ............................... no
    mtdev .................................. no
    tslib .................................. no
    xkbcommon-evdev ........................ no
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. no
    LinuxFB ................................ yes
    Mir client ............................. no
    X11:
    Using system provided XCB libraries .. no
    EGL on X11 ........................... no
    Xinput2 .............................. no
    XCB XKB .............................. no
    XLib ................................. yes
    Xrender .............................. yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... no
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows
    Qt PrintSupport:
    CUPS ................................... no
    Qt SerialBus:
    Socket CAN ............................. yes
    Socket CAN FD .......................... yes
    QtXmlPatterns:
    XML schema support ..................... yes
    Qt QML:
    QML interpreter ........................ yes
    QML network support .................... yes
    Qt Quick:
    Direct3D 12 ............................ no
    AnimatedImage item ..................... yes
    Canvas item ............................ yes
    Support for Quick Designer ............. yes
    Flipable item .......................... yes
    GridView item .......................... yes
    ListView item .......................... yes
    Path support ........................... yes
    PathView item .......................... yes
    Positioner items ....................... yes
    ShaderEffect item ...................... yes
    Sprite item ............................ yes
    Qt Gamepad:
    SDL2 ................................... no
    Qt 3D:
    System Assimp .......................... no
    Qt Wayland Client ........................ no
    Qt Wayland Compositor .................... no
    Qt Bluetooth:
    BlueZ .................................. no
    BlueZ Low Energy ....................... no
    Linux Crypto API ....................... no
    Qt Multimedia:
    ALSA ................................... no
    GStreamer 1.0 .......................... no
    GStreamer 0.10 ......................... no
    Video for Linux ........................ yes
    OpenAL ................................. no
    PulseAudio ............................. no
    Resource Policy (libresourceqt5) ....... no
    DirectShow ............................. no
    Windows Media Foundation ............... no
    Qt Location:
    Gypsy GPS Daemon ....................... no
    WinRT Geolocation API .................. no
    Qt Sensors:
    sensorfw ............................... no
    Qt WebEngine:
    Proprietary Codecs ..................... no
    Spellchecker ........................... yes
    ALSA ................................... no
    PulseAudio ............................. no

    Note: 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.

    Note: Dropped compiler flags '-pthread' when detecting library 'glib'.

    Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

    ERROR: The OpenGL functionality tests failed!
    You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
    QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

    Check config.log for details.





  • not worked !


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Looks like you are missing the OpenGL development libraries.

    Also "Not worked" doesn't help much. You should show the exact error message given in config.log for example.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.