qt - Why ldd produces different result for the same file in different directories? -


i trying deploy qt/qml application linux. strange occured target system complained undefined symbol in libqt5widget.so.5, while had copied qt-related libraries shown in ldd -r result of file, , ldd -r on target system said there's no "not found" libraries.

after time discovered ldd -r in own system spotted undefined symbols. when ldd -r same file in qt installation directory, however, no undefined symbols found.

the output looked this:

wyl8899@ubuntu:~/deploy/qt_libraries$ ldd -r libqt5widgets.so.5     linux-vdso.so.1 =>  (0x00007ffd1409a000)     libqt5gui.so.5 => /usr/lib/x86_64-linux-gnu/libqt5gui.so.5 (0x00007faac833d000)     libqt5core.so.5 => /usr/lib/x86_64-linux-gnu/libqt5core.so.5 (0x00007faac7c97000)     libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faac7a79000) (... , more)     libxau.so.6 => /usr/lib/x86_64-linux-gnu/libxau.so.6 (0x00007faac0d13000)     libxdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libxdmcp.so.6 (0x00007faac0b0d000) undefined symbol: _znk19qabstracttablemodel7siblingeiirk11qmodelindex   (./libqt5widgets.so.5) undefined symbol: _zti17qpixmapiconengine   (./libqt5widgets.so.5) undefined symbol: _zn17qpixmapiconengine5paintep8qpainterrk5qrectn5qicon4modeens5_5statee   (./libqt5widgets.so.5) (... , more)  wyl8899@ubuntu:~/deploy/qt_libraries$ ldd -r /opt/qt/5.5/gcc_64/lib/libqt5widgets.so.5     linux-vdso.so.1 =>  (0x00007fff4b5e5000)     libqt5gui.so.5 => /opt/qt/5.5/gcc_64/lib/libqt5gui.so.5 (0x00007ff5e3978000)     libqt5core.so.5 => /opt/qt/5.5/gcc_64/lib/libqt5core.so.5 (0x00007ff5e3233000) (... , more)     libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007ff5dcdad000)     libxau.so.6 => /usr/lib/x86_64-linux-gnu/libxau.so.6 (0x00007ff5dcba9000)     libxdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libxdmcp.so.6 (0x00007ff5dc9a3000) 

also noticed number of libraries shown differs. know caused ldd -r produces different result same file in different directories. thanks!

i'm not 100% sure, i'd in first case ldd picks system qt libraries:

  • libqt5core.so.5 in /usr/lib/x86_64-linux-gnu/
  • libqt5gui.so.5 in /usr/lib/x86_64-linux-gnu/

and don't have required symbols. in second case ldd picks qt libraries in same directory pointed libqt5widgets.so.5:

  • libqt5core.so.5 in /opt/qt/5.5/gcc_64/lib/
  • libqt5gui.so.5 in /opt/qt/5.5/gcc_64/lib/

and have required symbols.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -