Results 1 to 4 of 4

Thread: adding system libraries statically to Qt5 project

  1. #1
    Join Date
    Jul 2013
    Posts
    16
    Thanks
    6
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default adding system libraries statically to Qt5 project

    I compiled Qt5 statically in Debian 7.1. I get this error when I tried to execute my app in Debian 5:

    Qt Code:
    1. error while loading shared libraries: libxcb-glx.so.0: cannot open shared object file: No such file or directory
    To copy to clipboard, switch view to plain text mode 

    If I installed libxcb-glx package in Debian 5 error was gone. But I do not want this. My app should work in Debian 5 without installing any file.
    Then I right-click my project title and select Add Library. There are 4 option in menu and I try all of them. Everytime my app gave same error.
    So how can I add system libraries statically to my project?

    Thanks.
    Last edited by iskenderoguz; 23rd July 2013 at 09:53.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,690
    Thanks
    13
    Thanked 1,599 Times in 1,527 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: adding system libraries statically to Qt5 project

    You would have to identify every system library that Qt depends on, build a static version of it, and link to that static version.

  3. #3
    Join Date
    Jul 2013
    Posts
    16
    Thanks
    6
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: adding system libraries statically to Qt5 project

    Thank you for your answer. Can you say how can I do this. Or is there any tutorial about it?

    Also system libraries are:

    Qt Code:
    1. linux-gate.so.1 => (0xb7759000)
    2. libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xb7741000)
    3. libXi.so.6 => /usr/lib/i386-linux-gnu/libXi.so.6 (0xb7732000)
    4. libxcb-render-util.so.0 => /usr/lib/i386-linux-gnu/libxcb-render-util.so.0 (0xb772c000)
    5. libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xb7713000)
    6. libxcb-render.so.0 => /usr/lib/i386-linux-gnu/libxcb-render.so.0 (0xb7708000)
    7. libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb76e5000)
    8. libxcb-image.so.0 => /usr/lib/i386-linux-gnu/libxcb-image.so.0 (0xb76df000)
    9. libxcb-icccm.so.4 => /usr/lib/i386-linux-gnu/libxcb-icccm.so.4 (0xb76d7000)
    10. libxcb-sync.so.0 => /usr/lib/i386-linux-gnu/libxcb-sync.so.0 (0xb76d1000)
    11. libxcb-xfixes.so.0 => /usr/lib/i386-linux-gnu/libxcb-xfixes.so.0 (0xb76c9000)
    12. libxcb-shm.so.0 => /usr/lib/i386-linux-gnu/libxcb-shm.so.0 (0xb76c5000)
    13. libxcb-randr.so.0 => /usr/lib/i386-linux-gnu/libxcb-randr.so.0 (0xb76b9000)
    14. libxcb-shape.so.0 => /usr/lib/i386-linux-gnu/libxcb-shape.so.0 (0xb76b4000)
    15. libxcb-keysyms.so.1 => /usr/lib/i386-linux-gnu/libxcb-keysyms.so.1 (0xb76b0000)
    16. libfontconfig.so.1 => /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb767a000)
    17. libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb75de000)
    18. libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb75cc000)
    19. libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb7493000)
    20. libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb7489000)
    21. libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb7470000)
    22. libicui18n.so.48 => /usr/lib/i386-linux-gnu/libicui18n.so.48 (0xb7296000)
    23. libicuuc.so.48 => /usr/lib/i386-linux-gnu/libicuuc.so.48 (0xb712c000)
    24. libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb7127000)
    25. librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb711e000)
    26. libGL.so.1 => /usr/lib/i386-linux-gnu/libGL.so.1 (0xb70c4000)
    27. libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb70ab000)
    28. libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6fbf000)
    29. libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb6f98000)
    30. libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6f7b000)
    31. libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb6e18000)
    32. /lib/ld-linux.so.2 (0xb775a000)
    33. libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb6e15000)
    34. libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb6e0f000)
    35. libxcb-util.so.0 => /usr/lib/i386-linux-gnu/libxcb-util.so.0 (0xb6e08000)
    36. libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb6dde000)
    37. libicudata.so.48 => /usr/lib/i386-linux-gnu/libicudata.so.48 (0xb5c6d000)
    38. libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xb5c57000)
    39. libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb5c53000)
    40. libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb5c4d000)
    41. libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb5c47000)
    42. libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xb5c39000)
    To copy to clipboard, switch view to plain text mode 

    Debian 5 already has some of them. If copied nonexistent libraries from Debian 7 to Debian 5's usr/lib/ folder my app works.
    Last edited by iskenderoguz; 23rd July 2013 at 10:41.

  4. #4

    Default Re: adding system libraries statically to Qt5 project

    Is there any follow up on this topic?
    I am having the same problem.

    I have statically built Qt5 on Linux (Ubuntu 14.04) 32 bit but it does not work on Linux 64-bit.

    Error says:
    "error while loading shared libraries: libxcb-render-util.so.0: cannot open shared object file: No such file or directory"

    Is there any how-to with explanation on how to build a fully-independent Qt app using Linux 32 bit for Linux 64 bit?
    Or on how to link the missing libraries to the executable file?
    (It would be nice if this could be made via QtCreator)

Similar Threads

  1. Replies: 4
    Last Post: 5th November 2011, 02:38
  2. Replies: 4
    Last Post: 7th May 2009, 08:19
  3. Creating Static libraries in Qt/Mac
    By nareshqt in forum Qt Programming
    Replies: 0
    Last Post: 2nd May 2008, 12:45
  4. having both static and dynamic libraries?
    By gfunk in forum Qt Programming
    Replies: 2
    Last Post: 7th May 2007, 08:33
  5. static objects in libraries
    By Rawk in forum Qt Programming
    Replies: 3
    Last Post: 16th January 2007, 20:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.