v0.91 Debian package doesn't work

*** Please report new bugs here! ***

Moderator: Dreamer

Post Reply
djcj
Posts: 50
Joined: Wed Jan 08, 2014 3:37 pm

v0.91 Debian package doesn't work

Post by djcj » Wed Sep 12, 2018 8:20 am

There's a missing library:
/opt/XnView/XnView: error while loading shared libraries: libQtAVWidgets.so.1: cannot open shared object file: No such file or directory

Hint: you can use the command ldd to check how the dependencies are resolved before creating a package.

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

Re: v0.91 Debian package doesn't work

Post by xnview » Wed Sep 12, 2018 1:57 pm

please re-download the package...
Pierre.

djcj
Posts: 50
Joined: Wed Jan 08, 2014 3:37 pm

Re: v0.91 Debian package doesn't work

Post by djcj » Wed Sep 12, 2018 3:16 pm

Still missing something:

Code: Select all

$ xnview 
/opt/XnView/XnView: error while loading shared libraries: libva.so.1: cannot open shared object file: No such file or directory
Like I said, use ldd to figure out the dependencies:

Code: Select all

djcj ~ $ cd /opt/XnView/
djcj /opt/XnView $ export LD_LIBRARY_PATH="$PWD/lib:$PWD/Plugins"
djcj /opt/XnView $ export QT_PLUGIN_PATH="$PWD/lib"
djcj /opt/XnView $ ldd ./XnView
	linux-vdso.so.1 (0x00007ffe5a5ec000)
	libQt5MultimediaWidgets.so.5 => /opt/XnView/lib/libQt5MultimediaWidgets.so.5 (0x00007fbcd90f8000)
	libQt5Multimedia.so.5 => /opt/XnView/lib/libQt5Multimedia.so.5 (0x00007fbcd8dee000)
	libQt5Widgets.so.5 => /opt/XnView/lib/libQt5Widgets.so.5 (0x00007fbcd85ba000)
	libQt5Gui.so.5 => /opt/XnView/lib/libQt5Gui.so.5 (0x00007fbcd7e09000)
	libQt5Network.so.5 => /opt/XnView/lib/libQt5Network.so.5 (0x00007fbcd7a77000)
	libQt5Core.so.5 => /opt/XnView/lib/libQt5Core.so.5 (0x00007fbcd733a000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbcd711b000)
	libQt5PrintSupport.so.5 => /opt/XnView/lib/libQt5PrintSupport.so.5 (0x00007fbcd6ead000)
	libQt5Svg.so.5 => /opt/XnView/lib/libQt5Svg.so.5 (0x00007fbcd6c58000)
	libQtAVWidgets.so.1 => /opt/XnView/lib/libQtAVWidgets.so.1 (0x00007fbcd6a2a000)
	libQt5WebKitWidgets.so.5 => /opt/XnView/lib/libQt5WebKitWidgets.so.5 (0x00007fbcd67e2000)
	libQt5X11Extras.so.5 => /opt/XnView/lib/libQt5X11Extras.so.5 (0x00007fbcd65de000)
	libQtAV.so.1 => /opt/XnView/lib/libQtAV.so.1 (0x00007fbcd6193000)
	libQt5Concurrent.so.5 => /opt/XnView/lib/libQt5Concurrent.so.5 (0x00007fbcd5f8c000)
	libQt5Xml.so.5 => /opt/XnView/lib/libQt5Xml.so.5 (0x00007fbcd5d52000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbcd5b4e000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbcd5816000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbcd5488000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbcd50ea000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbcd4ed2000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbcd4ae1000)
	libpulse-mainloop-glib.so.0 => /usr/lib/x86_64-linux-gnu/libpulse-mainloop-glib.so.0 (0x00007fbcd48dc000)
	libpulse.so.0 => /usr/lib/x86_64-linux-gnu/libpulse.so.0 (0x00007fbcd468c000)
	libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbcd4376000)
	libQt5OpenGL.so.5 => /opt/XnView/lib/libQt5OpenGL.so.5 (0x00007fbcd411e000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fbcd3e92000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbcd3c75000)
	libicui18n.so.56 => /opt/XnView/lib/libicui18n.so.56 (0x00007fbcd37dc000)
	libicuuc.so.56 => /opt/XnView/lib/libicuuc.so.56 (0x00007fbcd3424000)
	libicudata.so.56 => /opt/XnView/lib/libicudata.so.56 (0x00007fbcd1a41000)
	libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fbcd183f000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fbcd9316000)
	libXv.so.1 => /usr/lib/x86_64-linux-gnu/libXv.so.1 (0x00007fbcd163a000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fbcd1428000)
	libQt5WebKit.so.5 => /opt/XnView/lib/libQt5WebKit.so.5 (0x00007fbcceed6000)
	libQt5Sensors.so.5 => /opt/XnView/lib/libQt5Sensors.so.5 (0x00007fbccec96000)
	libswresample.so.3 => /opt/XnView/lib/libswresample.so.3 (0x00007fbccea7c000)
	libavfilter.so.7 => /opt/XnView/lib/libavfilter.so.7 (0x00007fbcce826000)
	libva.so.1 => not found
	libavcodec.so.58 => /opt/XnView/lib/libavcodec.so.58 (0x00007fbccdbf4000)
	libavformat.so.58 => /opt/XnView/lib/libavformat.so.58 (0x00007fbccd8ce000)
	libswscale.so.5 => /opt/XnView/lib/libswscale.so.5 (0x00007fbccd658000)
	libavutil.so.56 => /opt/XnView/lib/libavutil.so.56 (0x00007fbccd405000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbccd1dd000)
	libpulsecommon-11.1.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so (0x00007fbcccf5f000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fbcccd12000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fbcccaa0000)
	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fbccc86f000)
	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fbccc5b9000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbccc3b1000)
	libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fbccc1a7000)
	libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fbccbfa4000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fbccbc9b000)
	libQt5Positioning.so.5 => /opt/XnView/lib/libQt5Positioning.so.5 (0x00007fbccba3f000)
	libQt5Quick.so.5 => /opt/XnView/lib/libQt5Quick.so.5 (0x00007fbccb406000)
	libQt5Qml.so.5 => /opt/XnView/lib/libQt5Qml.so.5 (0x00007fbccae06000)
	libQt5WebChannel.so.5 => /opt/XnView/lib/libQt5WebChannel.so.5 (0x00007fbccabe8000)
	libQt5Sql.so.5 => /opt/XnView/lib/libQt5Sql.so.5 (0x00007fbcca9a1000)
	libva.so.1 => not found
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fbcca791000)
	libva.so.1 => not found
	libva-drm.so.1 => not found
	libva-x11.so.1 => not found
	libvdpau.so.1 => /usr/lib/x86_64-linux-gnu/libvdpau.so.1 (0x00007fbcca58d000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbcca389000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbcca183000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fbcc9eff000)
	libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007fbcc9cf5000)
	libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007fbcc9a7c000)
	libasyncns.so.0 => /usr/lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007fbcc9876000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fbcc9661000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fbcc943b000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fbcc921f000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fbcc8f04000)
	libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007fbcc8cea000)
	libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007fbcc8a73000)
	libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fbcc886a000)
	libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007fbcc863f000)
	libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007fbcc8396000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fbcc817b000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fbcc7f66000)
Now you can see which libraries are missing or loaded from the system instead of the opt directory. If you insist on certain libraries to be present on the system, use the Debian package dependencies for that.

djcj
Posts: 50
Joined: Wed Jan 08, 2014 3:37 pm

Re: v0.91 Debian package doesn't work

Post by djcj » Wed Sep 12, 2018 4:13 pm

I did some checks and it turns out you can install all the Qt libs through the dependencies. This will reduce the package size to 12 mb.
Here's the dependency line:

Code: Select all

Depends: libc6 (>= 2.17), libgcc1 (>= 1:3.0), libilmbase12, libqt5concurrent5, libqt5core5a, libqt5gui5, libqt5multimedia5, libqt5multimediawidgets5, libqt5network5, libqt5printsupport5, libqt5svg5, libqt5webkit5, libqt5widgets5, libqt5x11extras5, libqt5xml5, libqtav1, libqtavwidgets1, libstdc++6 (>= 4.8.1), libx11-6, zlib1g, perl:any
You can easily build such a package yourself:

Code: Select all

git clone https://github.com/darealshinji/debian-packaging
cd debian-packaging/graphics/xnviewmp && make
Package will be in $HOME/buildresult.

By the way IlmImf.so (which just seems to be a renamed libIlmImf-2_2.so.22 file) isn't listed among the plugins when I go Info->About->Plug-Ins.

djcj
Posts: 50
Joined: Wed Jan 08, 2014 3:37 pm

Re: v0.91 Debian package doesn't work

Post by djcj » Fri Sep 14, 2018 11:32 am

I see that the libqtav packages are not available on older distros. But you should better check the package in a clean environment (i.e. VirtualBox) to see if it really works without problems.

edit:

Another side-note: in xnview.sh you should always keep the old PATH environment variables:

Code: Select all

export LD_LIBRARY_PATH="$dirname/lib:$dirname/Plugins"
export QT_PLUGIN_PATH="$dirname/lib"
should be

Code: Select all

export LD_LIBRARY_PATH="$dirname/lib:$dirname/Plugins:$LD_LIBRARY_PATH"
export QT_PLUGIN_PATH="$dirname/lib:$QT_PLUGIN_PATH"
edit2:
I've changed my build files on Github to keep the bundled libraries in the package.

User avatar
xnviocumo
Posts: 9
Joined: Mon Oct 17, 2016 12:11 pm

Re: v0.91 Debian package doesn't work

Post by xnviocumo » Fri Sep 14, 2018 5:09 pm

In kubuntu 18.04, xnview v0.91 (installed from the x64 deb package) also fails with:

Code: Select all

/opt/XnView/XnView: error while loading shared libraries: libva-drm.so.1: cannot open shared object file: No such file or directory
...and

Code: Select all

/opt/XnView/XnView: error while loading shared libraries: libva-x11.so.1: cannot open shared object file: No such file or directory
as a consequence of what @djcj has explained so very detailed (thanks a lot for this valuable help, djcj).

I would like to contribute to help those who come to this thread and don't know what to do other than wait for the fix. This is how I made it work --at least for now.

WORKAROUND
Note that this is not a final solution, it is just a hack to get you working until a fix is posted.

Basic background (you can just skip this part and go to the solution below if you want):

If you are missing libva-drm.so.1 and/or libva-x11.so.1, you should note that there are no packages that provide those specific versions for ubuntu 18.04. The available versions are libva-drm.so.2 and/or libva-x11.so.2. Now, there is the package libva-dev, which provide libva-drm.so and libva-x11.so . I didn't install it, because if the versions wouldn't match, I would be in the same position: having an older version, or a newer one.

So I tried the following hack, with success: make symlinks (in the /opt/XnView/lib/ directory) to the available files. To put it simple:

If you are missing libva-drm.so.1 and/or libva-x11.so.1, enter this code in a console:

Code: Select all

cd /opt/XnView/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libva-drm.so.2 libva-drm.so.1
sudo ln -s /usr/lib/x86_64-linux-gnu/libva-x11.so.2 libva-x11.so.1
Assuming those where the only missing files in your system, as I had in my ubuntu 18.04 system, you should be done.
In my case, I did have a bit of strange behavior on the browser view (couldn't select files in detailed view) but I fixed it with this:
Settings -> Interface -> Recent files -> Purge now, and then restarted xnview. So far, it's working.

Edited on 15.09.2018 to add the following:

The above code doesn't affect any other thing than xnview; that's why the symlinks are done in XnView's directory.
If for any reason you would like to undo them, just enter this code to delete the two symlinks and get back to exactly how it was before:

Code: Select all

cd /opt/XnView/lib/
sudo rm -i  libva-drm.so.1  libva-x11.so.1
The -i flag is just a simple precaution: it provides confirmation before deleting.
Last edited by xnviocumo on Sat Sep 15, 2018 3:11 pm, edited 1 time in total.

User avatar
xnviocumo
Posts: 9
Joined: Mon Oct 17, 2016 12:11 pm

Re: v0.91 Debian package doesn't work

Post by xnviocumo » Fri Sep 14, 2018 8:23 pm

Hi Pierre,
I have just noticed that the XnViewMP-linux-x64.deb package currently in your download page is different than the one I downloaded and installed less than 20 hours ago. In fact:
XnViewMP-linux-x64.deb package

1. downloaded today early in the morning:
md5sum: 994b4c2b44eac3be53dbe905be5c4d08
file size: 43.546.752

2. downloaded few minutes ago:
md5sum 3f112b50f73bd77cee2381f293f3a92c
file size: 44.215.802

Have you posted a new build? or could you please say what is the correct md5 checksum ?

If there would be two builds in use with the same version, that would be confusing. Perhaps if you would publish the build number, together with the download link, (and some hash, maybe md5 or better) that would be more transparent for downloaders what version do they have to download...

Thank you

djcj
Posts: 50
Joined: Wed Jan 08, 2014 3:37 pm

Re: v0.91 Debian package doesn't work

Post by djcj » Sat Sep 15, 2018 8:57 am

xnviocumo wrote:
Fri Sep 14, 2018 8:23 pm
If there would be two builds in use with the same version, that would be confusing. Perhaps if you would publish the build number, together with the download link, (and some hash, maybe md5 or better) that would be more transparent for downloaders what version do they have to download...

Thank you
I agree. A revision could be helpful.

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

Re: v0.91 Debian package doesn't work

Post by xnview » Sun Sep 16, 2018 4:28 pm

xnviocumo wrote:
Fri Sep 14, 2018 8:23 pm
Have you posted a new build?

yes, with missing libraries
Pierre.

VictorVG
Posts: 15
Joined: Mon Aug 24, 2009 10:54 pm

Re: v0.91 Debian package doesn't work

Post by VictorVG » Sun Sep 16, 2018 5:02 pm

I checked the availability of libQtAVWidgets.so.1 in the tarballs for Linux x86 and Linux x64 - there is no file with that name in them. I did not get this error, but Dicinson with forum.ru-board.com has repeatedly asked a question about this. :)

Post Reply