Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Compiling QT5 without X11



  • Re: Compiling Qt 5 without X11 nor Wayland
    I have QT5.5 running at my imx6 board.
    I need 5.10. I compiled QT without X11 and static libs (at least i try) but the application wants
    libXext.so.6.

    My configuration:

    ./configure -opensource -confirm-license -v -no-shared -static
    -prefix /usr/local/qt5 -extprefix $HOME/imx6/qt5 -device linux-imx6-g++
    -no-xcb-xlib -eglfs -opengl es2
    -skip qt3d -skip webengine -skip qtwayland -skip qtxmlpatterns -skip qtserialbus -skip qtdeclarative
    -skip qttools -skip qtscript -nomake examples -nomake tests\
    -device-option CROSS_COMPILE=/opt/poky/1.8.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
    -sysroot /opt/poky/1.8.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/

    In my config.summary:

    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. yes
    EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... yes
    EGLFS i.Mx6 Wayland .................. yes
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... no
    LinuxFB ................................ yes
    VNC .................................... yes
    Mir client ............................. no
    X11:
    Using system-provided XCB libraries .. yes
    EGL on X11 ........................... no
    Xinput2 .............................. no
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. no
    Using system-provided xkbcommon ...... yes
    Native painting (experimental) ....... no
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows

    What am I doing wrong?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Isn't -no-xcb what you want ?



  • That is what I want.
    If i do -no-xcb whithout -xlib I get more X11 lib stuff.



  • I recommend these links to compile static, download the fonts and configure what you need:

    https://wiki.qt.io/Building_Qt_5_from_Git
    https://doc.qt.io/QtForDeviceCreation/qtee-static-linking.html

    In addition to -no-xlib set up also removing -skip qtactiveqt -skip qtmacextras -skip qtwayland -skip qtwinextras support, I do so.


    Cleiton Bueno

    Blog | Linkedin | B2Open



  • No matter what I do my application keeps complaining:

    error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory

    Why is this X11 lib needed? What am I missing?
    It was not needed in QT4.8

    I skipped everything I don't need:
    ./configure -opensource -confirm-license -static
    -prefix /usr/local/qt510 -extprefix /usr/local/qt510 -device linux-imx6-g++
    -device-option CROSS_COMPILE=/opt/poky/1.8.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
    -sysroot /opt/poky/1.8.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/
    -psql_config /dev/null
    -no-xcb -opengl es2
    -nomake tests -nomake examples
    -no-dbus
    -skip qtwebengine
    -skip qtxmlpatterns -skip qtserialbus -skip qtdeclarative
    -skip qtactiveqt -skip qtmacextras -skip qtwayland -skip qtwinextras
    -skip qt3d -skip qtlocation -skip qtgamepad -skip qtandroidextras
    -skip qtpurchasing -skip qtspeech -skip qtdatavis3d
    -skip qtscript -skip qtx11extras -skip qtsensors -skip qtconnectivity
    -skip qtwebsockets -skip qtwebglplugin -skip qtwebchannel -skip qtremoteobjects
    -skip qtnetworkauth


Log in to reply