Issue with LD_LIBRARY_PATH (application deploying) [SOLVED]
-
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
fichmod 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?
-
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
xcbAborted
@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?
-
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...