XnViewMP 0.35 fails to start
Posted: Mon Mar 28, 2011 8:47 am
This is what happens when I try to run it:
I use latest Debian Sid with KDE 4.4.5 with 4.7.2 Qt libraries, and downloaded 64-bit version of XnViewMP. Error is obvious but does not include important detail: what library is conflicting exactly? Let's see...
Here it is: /usr/lib/libQtDBus.so.4 that's actually is symbolic link to /usr/lib/libQtDBus.so.4.7.2. But why XnViewMP tries to load it?
As you can see, ldd shows that XnViewMP does not require libQtDBus.so.4 at all. Obvious thing to try is to make libQtDBus.so.4 inaccessible for XnViewMP. If I do this, this is what I get:
Important thing is that despite large number of these "errors" XnViewMP runs fine (please note that "errors" are only visible because of strace). It looks like XnViewMP doesn't need libQtDBus.so.4 because if it fails to find it - it works as far as I can tell, but if it finds it - XnViewMP will very likely to fail to work if version of libQtDBus.so.4 isn't 4.7.1.
Short conclusion:
Workarond: if you get "Cannot mix incompatible Qt library" make /usr/lib/libQtDBus.so.4 inaccessible for XnViewMP, it will run and work perfectly as far as I can tell.
Suggested fix: if XnViewMP really don't need libQtDBus.so.4 - make it not to try to load it at all (and XnViewMP definitely should not try to load so many times something that do not exist); for me XnViewMP works perfectly without this library but in case it is needed for something, it should be normal library dependency viewable with ldd and libQtDBus.so.4 should be included in lib directory of XnViewMP package.
Code: Select all
% ./xnview.sh
Cannot mix incompatible Qt library (version 0x40702) with this library (version 0x40701)
Code: Select all
export QT_PLUGIN_PATH="`pwd`"/lib
export LD_LIBRARY_PATH="`pwd`"/lib
strace ./xnview |& grep -i libqt | grep -v XnViewMP
open("/usr/lib/libQtDBus.so.4", O_RDONLY) = 8
Code: Select all
% ldd xnview | grep -i libqt
libQtWebKitXn.so.4 => /var/pkgs/xnview/XnViewMP-035/lib/libQtWebKitXn.so.4 (0x00007ffff6818000)
libQtGuiXn.so.4 => /var/pkgs/xnview/XnViewMP-035/lib/libQtGuiXn.so.4 (0x00007ffff5894000)
libQtCoreXn.so.4 => /var/pkgs/xnview/XnViewMP-035/lib/libQtCoreXn.so.4 (0x00007ffff53dd000)
libQtSvgXn.so.4 => /var/pkgs/xnview/XnViewMP-035/lib/libQtSvgXn.so.4 (0x00007ffff4f0c000)
libQtXmlXn.so.4 => /var/pkgs/xnview/XnViewMP-035/lib/libQtXmlXn.so.4 (0x00007ffff4cc2000)
libQtNetworkXn.so.4 => /var/pkgs/xnview/XnViewMP-035/lib/libQtNetworkXn.so.4 (0x00007ffff49bb000)
Code: Select all
% sudo mv /usr/lib/libQtDBus.so.4{,~}
% strace ./xnview |& grep -i libqtdbus | head -n20
open("/var/pkgs/xnview/XnViewMP-035/lib/libQtDBus.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libQtDBus.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libQtDBus.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
... (last three lines repeat quickly very many times) ...
Short conclusion:
Workarond: if you get "Cannot mix incompatible Qt library" make /usr/lib/libQtDBus.so.4 inaccessible for XnViewMP, it will run and work perfectly as far as I can tell.
Suggested fix: if XnViewMP really don't need libQtDBus.so.4 - make it not to try to load it at all (and XnViewMP definitely should not try to load so many times something that do not exist); for me XnViewMP works perfectly without this library but in case it is needed for something, it should be normal library dependency viewable with ldd and libQtDBus.so.4 should be included in lib directory of XnViewMP package.