Results 1 to 3 of 3

Thread: Static linking on OpenSUSE for deployment on Ubuntu - what to link?

  1. #1
    Join Date
    May 2014
    Posts
    5
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Static linking on OpenSUSE for deployment on Ubuntu - what to link?

    After successfully linking my application to the static library in OpenSUSE, I copied it over to a qt-less Ubuntu machine only to find that xkbcommon and EGL are missing from the executable.

    I run ldd on my application in OpenSUSE, and this is what I get:

    Qt Code:
    1. linux-vdso.so.1 (0x00007fff5cdfe000)
    2. libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f2e9336f000)
    3. libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f2e9315f000)
    4. libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f2e92f57000)
    5. libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f2e92d3b000)
    6. libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f2e92b1c000)
    7. libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f2e928df000)
    8. libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f2e9264d000)
    9. libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f2e92443000)
    10. libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f2e92231000)
    11. libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f2e91ef3000)
    12. libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f2e91cd2000)
    13. libdl.so.2 => /lib64/libdl.so.2 (0x00007f2e91ace000)
    14. librt.so.1 => /lib64/librt.so.1 (0x00007f2e918c6000)
    15. libGL.so.1 => /usr/X11R6/lib64/libGL.so.1 (0x00007f2e916e4000)
    16. libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2e914c6000)
    17. libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f2e911be000)
    18. libm.so.6 => /lib64/libm.so.6 (0x00007f2e90ebb000)
    19. libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2e90ca4000)
    20. libc.so.6 => /lib64/libc.so.6 (0x00007f2e908f5000)
    21. /lib64/ld-linux-x86-64.so.2 (0x00007f2e93571000)
    22. libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f2e906f0000)
    23. libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f2e904ec000)
    24. libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f2e902c2000)
    25. libz.so.1 => /lib64/libz.so.1 (0x00007f2e900ac000)
    26. libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f2e8fe6f000)
    27. libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 (0x00007f2e8fc6a000)
    28. libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007f2e8fa63000)
    29. libgbm.so.1 => /usr/lib64/libgbm.so.1 (0x00007f2e8f85c000)
    30. libwayland-client.so.0 => /usr/lib64/libwayland-client.so.0 (0x00007f2e8f64f000)
    31. libwayland-server.so.0 => /usr/lib64/libwayland-server.so.0 (0x00007f2e8f43f000)
    32. libudev.so.1 => /usr/lib64/libudev.so.1 (0x00007f2e8f22d000)
    33. libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007f2e8f021000)
    34. libatiuki.so.1 => /usr/lib64/libatiuki.so.1 (0x00007f2e9364c000)
    35. libffi.so.4 => /usr/lib64/libffi.so.4 (0x00007f2e8ee19000)
    36. libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f2e8ebf5000)
    37. libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f2e8e98f000)
    To copy to clipboard, switch view to plain text mode 

    Am I supposed to statically link all of these before deployment?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Static linking on OpenSUSE for deployment on Ubuntu - what to link?

    If you want your executable to work on top of just the kernel, without any library what so ever present, then yes, you'll have to link all libraries statically into that executable.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    bloks (11th June 2014)

  4. #3
    Join Date
    May 2014
    Posts
    5
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Static linking on OpenSUSE for deployment on Ubuntu - what to link?

    Is there a resource somewhere that compares the Ubuntu and OpenSUSE libraries?

    I'm concerned about linking libraries that potentially could break the program, such as X11, and linking libraries that makes other ones redundant.

Similar Threads

  1. Replies: 4
    Last Post: 26th May 2014, 14:48
  2. Replies: 1
    Last Post: 18th May 2014, 21:46
  3. Ubuntu application deployment
    By budda in forum Newbie
    Replies: 3
    Last Post: 15th September 2013, 17:09
  4. Replies: 3
    Last Post: 7th February 2012, 10:40
  5. Building an application using static QT libraries on Linux openSuse 10.2
    By mmeerten in forum Installation and Deployment
    Replies: 1
    Last Post: 1st July 2010, 21:35

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.