Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue with LD_LIBRARY_PATH (application deploying) [SOLVED]
QtWS25 Last Chance

Issue with LD_LIBRARY_PATH (application deploying) [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 4.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Interima.x2
    wrote on last edited by
    #1

    Hi

    I set LD_LIBRARY_PATH for deploying application.

    @#!/bin/sh

    appname=basename $0 | sed s,\.sh$,,

    dirname=dirname $0
    tmp="${dirname#?}"

    if [ "${dirname%$tmp}" != "/" ]; then
    dirname=$PWD/$dirname
    fi

    chmod a+x $dirname/$appname

    LD_LIBRARY_PATH=$dirname
    export LD_LIBRARY_PATH

    $dirname/$appname "$@" @

    Also i copy to application's directory files

    @>ls -c1
    libQt5Sql.so
    libQt5Gui.so.5.0.0*
    libQt5Core.so.5
    libQt5Network.so.5
    libQt5Sql.so.5.0
    libQt5XmlPatterns.so.5.0
    libicudata.so.49
    libQt5Declarative.so
    libQt5Script.so.5.0.0*
    libQt5Declarative.so.5
    libQt5Gui.so.5
    libQt5Network.so
    libQt5Xml.so.5.0.0*
    libicui18n.so.49.1.2*
    libQt5Sql.so.5
    libQt5XmlPatterns.so
    libQt5XmlPatterns.so.5.0.0*
    libQt5Xml.so
    libQt5Declarative.so.5.0.0*
    libQt5Widgets.so.5
    libQt5Gui.so
    libQt5Widgets.so
    libQt5Core.so.5.0.0*
    libicuuc.so.49
    libQt5Widgets.so.5.0
    libQt5Widgets.so.5.0.0*
    libQt5Network.so.5.0.0*
    libQt5XmlPatterns.so.5
    libicudata.so.49.1.2*
    libicuuc.so.49.1.2*
    libicui18n.so.49
    libQt5Declarative.so.5.0
    libQt5Sql.so.5.0.0*
    libQt5Xml.so.5.0
    libQt5Core.so
    libQt5Core.so.5.0
    libQt5Network.so.5.0
    libQt5Script.so.5
    libQt5Script.so
    libQt5Xml.so.5
    libQt5Script.so.5.0
    libQt5Gui.so.5.0@

    when running script in console:
    @Qt at-spi: error getting the accessibility dbus address: "The name org.a11y.Bus was not provided by any .service files" @

    @>lsof -p [my process pid]
    ...
    ...
    /home/Qt-5-x86-x64/5.0.0/gcc_64/lib/libicui18n.so.49.1.2
    /home/Qt-5-x86-x64/5.0.0/gcc_64/lib/libQt5Sql.so.5.0.0
    ...
    and etc.@

    So application don't use libraries from own directory, but use it from Qt installation path. Why? Where is error?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Interima.x2
      wrote on last edited by
      #2

      When i set LD_LIBRARY_PATH manually in terminal, change Qt installation path and run:
      @ldd <myapp>

      libQt5Widgets.so.5 => ./libQt5Widgets.so.5 (0x00007f55fcc4f000)
      libQt5Declarative.so.5 => ./libQt5Declarative.so.5 (0x00007f55fc6c7000)
      libQt5Xml.so.5 => ./libQt5Xml.so.5 (0x00007f55fc48b000)
      libQt5Gui.so.5 => ./libQt5Gui.so.5 (0x00007f55fbe8b000)
      libQt5Script.so.5 => ./libQt5Script.so.5 (0x00007f55fba11000)
      libQt5Core.so.5 => ./libQt5Core.so.5 (0x00007f55fb3da000)
      @

      It means that ldd find it. But when i run application i have:
      @Failed to load platform plugin "xcb". Available platforms are:
      linuxfb
      minimal
      xcb

      Aborted
      @

      Do i need to deploy Qt platforms plugins?

      But when i do ldd it shows:
      @libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f9843768000)
      @

      There no path to Qt platforms plugin! Why app depends from it?

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Interima.x2
        wrote on last edited by
        #3

        Problem was resolved.
        I copy all Qt libs to application directory and start delete it one by one.
        And i find that problem was in Qt5DBus. ldd don't show it for my app, therefore i don't copy it to app directory.
        Strange why ldd didn'y show it...

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved