Results 1 to 5 of 5

Thread: Deploying Qt 5 application on Linux

  1. #1
    Join Date
    Jan 2016
    Posts
    2
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Deploying Qt 5 application on Linux

    I have installed QT 5.5.1 on my Ubutu 14.04 64 bit machine using the online installer.

    I have developed an application using QML using QtCreator. The application runs fine on the same PC.

    I wanted to run the application on another Ubuntu PC without QT installation.

    Using ldd I found the dynamically linked QT libraries for my application.

    Qt Code:
    1. linux-vdso.so.1 => (0x00007ffccbfd1000)
    2. libQt5Widgets.so.5 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libQt5Widgets.so.5 (0x00007f46a6afd000)
    3. libQt5Gui.so.5 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libQt5Gui.so.5 (0x00007f46a62eb000)
    4. libQt5Qml.so.5 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libQt5Qml.so.5 (0x00007f46a5cbc000)
    5. libQt5Network.so.5 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libQt5Network.so.5 (0x00007f46a5963000)
    6. libQt5Xml.so.5 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libQt5Xml.so.5 (0x00007f46a5727000)
    7. libQt5Core.so.5 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libQt5Core.so.5 (0x00007f46a4fe1000)
    8. libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f46a4cdd000)
    9. libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f46a4ac7000)
    10. libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f46a4702000)
    11. libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f46a44e4000)
    12. libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f46a4293000)
    13. libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f46a4091000)
    14. librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f46a3e89000)
    15. libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f46a3b81000)
    16. libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f46a396f000)
    17. libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f46a363a000)
    18. libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f46a33d4000)
    19. libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f46a30ce000)
    20. /lib64/ld-linux-x86-64.so.2 (0x00007f46a737c000)
    21. libicui18n.so.54 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libicui18n.so.54 (0x00007f46a2c60000)
    22. libicuuc.so.54 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libicuuc.so.54 (0x00007f46a28b2000)
    23. libicudata.so.54 => /home/vinoth/Qt_5_5/5.5/gcc_64/lib/libicudata.so.54 (0x00007f46a0e88000)
    24. libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f46a0c84000)
    25. libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f46a0a7c000)
    26. libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f46a083e000)
    27. libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f46a061f000)
    28. libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f46a03f8000)
    29. libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f46a01f5000)
    30. libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f469ffef000)
    31. libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f469fded000)
    32. libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f469fbd6000)
    33. libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f469f9d1000)
    34. libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f469f7ce000)
    35. libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f469f5cb000)
    36. libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f469f3c5000)
    37. libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f469f1c3000)
    38. libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f469efbd000)
    39. libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f469edb1000)
    40. libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f469ebad000)
    41. libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f469e9a7000)
    To copy to clipboard, switch view to plain text mode 


    I copied all the dependent libraries to my target machine and also created a run script containing the following:

    Qt Code:
    1. #!/bin/sh
    2. export LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
    3. export QML_IMPORT_PATH=`pwd`/imports:`pwd`/qml
    4. export QML2_IMPORT_PATH=`pwd`/qml/
    5. export QT_QPA_PLATFORM_PLUGIN_PATH=`pwd`/plugins/platforms
    6. ./myapp
    To copy to clipboard, switch view to plain text mode 

    I got the following errors.

    Qt Code:
    1. QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    2. Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile 0)
    3. Aborted (core dumped)
    To copy to clipboard, switch view to plain text mode 


    Can somebody help, what could be the issue here? Am I missing anything?

    Thanks,
    Vinoth

  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: Deploying Qt 5 application on Linux

    Is that ldd output from the developer PC or the target?

    If it is not for the target, how does it look there?
    Are the OpenGL libraries installed?

    Cheers,
    _

  3. #3
    Join Date
    Jan 2016
    Posts
    2
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Deploying Qt 5 application on Linux

    Hi,

    The ldd output is from the developer PC.

    The ldd output on target PC is as below:

    linux-vdso.so.1 => (0x00007ffef33ef000)
    libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007fbcf0589000)
    libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fbceff3c000)
    libQt5Qml.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 (0x00007fbcef935000)
    libQt5Network.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007fbcef5f1000)
    libQt5Xml.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007fbcef3b5000)
    libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fbceed0f000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbceea0b000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbcee7f5000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbcee430000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbcee212000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fbcedfc1000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbcedcb9000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbced984000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbced67e000)
    libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fbced458000)
    libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fbced203000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbcecfea000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007fbcecd84000)
    libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52 (0x00007fbcec97d000)
    libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52 (0x00007fbcec604000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbcec400000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbcec1f8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fbcf0db2000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fbcebff0000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fbcebdb2000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbcebb93000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fbceb8f0000)
    libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fbceb6d4000)
    libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007fbceb4ad000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fbceb29b000)
    libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fbceb098000)
    libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fbceae92000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fbceac90000)
    libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007fbceaa79000)
    libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007fbcea874000)
    libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007fbcea671000)
    libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007fbcea46e000)
    libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fbcea268000)
    libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007fbcea066000)
    libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fbce9e60000)
    libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fbce9c54000)
    libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52 (0x00007fbce83e7000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbce81e3000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbce7fdd000)

    Yes I have the opengl libraries installed on target PC.

    I also tested a simple opengl program from the following link.
    https://singhgurjot.wordpress.com/20...-ubuntu-12-04/

  4. #4
    Join Date
    Feb 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Deploying Qt 5 application on Linux

    Hi,

    i have the same problem. My application don't use QML, it use qtWebEngineWidget.

    All library are present on target PC
    ldd on app_file is OK (on target PC)

    glxinfo is OK
    glxgear display the gear on display


    the output when my app start is :

    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    Could not find QtWebEngineProcess
    Abandon


    Have you resolved this problem (QXcbIntegration) ?
    For my second problem (Could not find QtWebEngineProcess), i have no idea too...


    Thanks

    Nico

  5. #5
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Deploying Qt 5 application on Linux

    This is an old issue, but just in case: it looks like you might need to deploy the xcbglintegrations plugins (i.e. libqxcb-egl-integration.so and libqxcb-glx-integration.so). See here for more information.

Similar Threads

  1. Deploying Qt application on Linux Ubantu OS
    By arunkumaraymuo1 in forum Newbie
    Replies: 9
    Last Post: 15th December 2012, 17:31
  2. Replies: 1
    Last Post: 2nd May 2011, 03:29
  3. Deploying Qt Application under Linux
    By addu in forum Qt Programming
    Replies: 17
    Last Post: 27th November 2010, 04:40
  4. Deploying application on Linux machine without Qt
    By will49 in forum Installation and Deployment
    Replies: 2
    Last Post: 10th July 2008, 22:41
  5. Deploying App on Linux
    By janus in forum Installation and Deployment
    Replies: 5
    Last Post: 6th May 2008, 21:18

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.