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

How to restrict linking of X server libraries with an application compiled for framebuffer



  • I have build a Qt 5.9.1 kit for x86 in my host Ubuntu 16.04. My target system only have frame buffer and i am running it using libqlinuxfb plugin.

    ldd myapplication gives

    	linux-gate.so.1 =>  (0xb776e000)
    	libQt5Widgets.so.5 => /opt/qt/qt5.9.1x86/lib/libQt5Widgets.so.5 (0xb705d000)
    	libQt5Gui.so.5 => /opt/qt/qt5.9.1x86/lib/libQt5Gui.so.5 (0xb6a17000)
    	libQt5Core.so.5 => /opt/qt/qt5.9.1x86/lib/libQt5Core.so.5 (0xb64b5000)
    	libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6324000)
    	libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6307000)
    	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6151000)
    	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb6134000)
    	libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb60de000)
    	libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xb606e000)
    	libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb6043000)
    	libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6028000)
    	libicui18n.so.55 => /usr/lib/i386-linux-gnu/libicui18n.so.55 (0xb5db5000)
    	libicuuc.so.55 => /usr/lib/i386-linux-gnu/libicuuc.so.55 (0xb5c1e000)
    	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb5c19000)
    	libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb5af0000)
    	/lib/ld-linux.so.2 (0x800f8000)
    	libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb5ac6000)
    	libxcb-dri3.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri3.so.0 (0xb5ac2000)
    	libxcb-present.so.0 => /usr/lib/i386-linux-gnu/libxcb-present.so.0 (0xb5abd000)
    	libxcb-sync.so.1 => /usr/lib/i386-linux-gnu/libxcb-sync.so.1 (0xb5ab5000)
    	libxshmfence.so.1 => /usr/lib/i386-linux-gnu/libxshmfence.so.1 (0xb5ab2000)
    	libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xb5a96000)
    	libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb5a81000)
    	libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb5a7c000)
    	libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb5a75000)
    	libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xb5a72000)
    	libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb5927000)
    	libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xb590c000)
    	libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xb5905000)
    	libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb58df000)
    	libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb58d8000)
    	libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xb58c5000)
    	libicudata.so.55 => /usr/lib/i386-linux-gnu/libicudata.so.55 (0xb400d000)
    	libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb3f97000)
    	libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb3f93000)
    	libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb3f8c000)
    
    

    I want to avoid X server based library linking with my application. Can anyone help me with a way out ?

    Thank you for you time.


  • Lifetime Qt Champion

    Hi,

    What options did you pass to configure ?



  • @SGaist Default configurations by the qtcreator

    qmake firstx86/firstx86.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug && /usr/bin/make qmake_all
    

    Edited :
    Are you asking about the options passed on to the build of Qt 5.9.1 ?


  • Lifetime Qt Champion

    Yes, the one you used to build your custom version of Qt.



  • @SGaist This is my configuration

    ./configure -opensource -confirm-license -skip wayland -no-egl -c++std c++11 -proprietary-codecs -v -I/opt/qt/qt5.9.1x86/include -L/opt/qt/qt5.9.1x86/lib -prefix /opt/qt/qt5.9.1x86
    

  • Lifetime Qt Champion

    From your options I don't see anywhere that you are disabling the xcb backend.



  • @SGaist Yes i have not disbaled xcb backend. But is it possible to build an application specifically for framebuffer ? Or the build will happen for all the plugins available ?


  • Lifetime Qt Champion

    The application stays generic, it’s just the backend plugin loaded that changes.


Log in to reply