XnViewMP 0.35 fails to start

Bugs and Suggestions in XnView MP or XnConvert MP which have been resolved.

Moderator: XnTriq

Post Reply
*Dark Dragon*
Posts: 8
Joined: Sat Dec 11, 2010 11:35 pm

XnViewMP 0.35 fails to start

Post by *Dark Dragon* » Mon Mar 28, 2011 8:47 am

This is what happens when I try to run it:

Code: Select all

% ./xnview.sh
Cannot mix incompatible Qt library (version 0x40702) with this library (version 0x40701)
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...

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
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?

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)
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:

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) ...
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.

User avatar
xnview
Author of XnView
Posts: 31887
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnViewMP 0.35 fails to start

Post by xnview » Tue Mar 29, 2011 7:53 pm

Strange that DBus library is needed. Could you send me your email by PM?
Pierre.

karls0
Posts: 8
Joined: Mon May 23, 2011 7:14 am
Location: Burgenland, Austria

Re: XnViewMP 0.35 fails to start

Post by karls0 » Mon May 23, 2011 7:19 am

xnview wrote:Strange that DBus library is needed. Could you send me your email by PM?
Hi Pierre,

I use aptosid and have the same problem. I get "Cannot mix incompatible Qt library (version 0x40703) with this library (version 0x40701)", when I try to start XnViewMP 0.35.

Please publish the solution, as soon as possible.

TIA
Karl
Not only for cars: "Add lightness -- Colin Chapman, Founder of Lotus"

User avatar
xnview
Author of XnView
Posts: 31887
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnViewMP 0.35 fails to start

Post by xnview » Mon May 23, 2011 1:41 pm

karls0 wrote: Please publish the solution, as soon as possible.
Please try to uncompress this file in the lib folder of xnview...
Pierre.

karls0
Posts: 8
Joined: Mon May 23, 2011 7:14 am
Location: Burgenland, Austria

Re: XnViewMP 0.35 fails to start

Post by karls0 » Fri Nov 25, 2011 8:37 am

Hi Pierre,
sorry forr being away for so long.
I tried to untar the extra-file, but XnViewMP does not start either. When I try to start it from the console, I get

Code: Select all

 root@siduxbox:/usr/local/XnViewMP-035# ./xnview
 ./xnview: error while loading shared libraries: libQtWebKitXn.so.4: cannot open shared object file: No such file or directory
Of course libQtWebKitXn.so.4 exists in /usr/local/XnViewMP-035/lib
Since all files were owned by UID 500, I did a chown to root.staff, which is the same on other files un /usr on my machine. This did not help!
I also tried the ldd-command on xnview and get:

Code: Select all

 root@siduxbox:/usr/local/XnViewMP-035# ldd ./xnview | grep -i libqt
        libQtWebKitXn.so.4 => not found
        libQtGuiXn.so.4 => not found
        libQtCoreXn.so.4 => not found
        libQtSvgXn.so.4 => not found
        libQtXmlXn.so.4 => not found
        libQtNetworkXn.so.4 => not found
Any ideas?

Regards
Karl
Not only for cars: "Add lightness -- Colin Chapman, Founder of Lotus"

karls0
Posts: 8
Joined: Mon May 23, 2011 7:14 am
Location: Burgenland, Austria

Re: XnViewMP 0.35 fails to start

Post by karls0 » Fri Nov 25, 2011 8:45 am

Sorry Pierre,
I did not see that 039 is out :evil:
Of course I will install it and try it with the new version!

Regards
Karl
Not only for cars: "Add lightness -- Colin Chapman, Founder of Lotus"

karls0
Posts: 8
Joined: Mon May 23, 2011 7:14 am
Location: Burgenland, Austria

Re: XnViewMP 0.35 fails to start

Post by karls0 » Fri Nov 25, 2011 10:16 am

The new version works fine - thank You Pierre!

Regards
Karl
Not only for cars: "Add lightness -- Colin Chapman, Founder of Lotus"

Post Reply