Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647950 - app-office/wps-office-10.1.0.5707_alpha21-r1 should not depend on sys-apps/systemd, should depend on media-libs/gstreamer:0.10 =media-libs/gst-plugins-base-0.10*
Summary: app-office/wps-office-10.1.0.5707_alpha21-r1 should not depend on sys-apps/sy...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-17 15:52 UTC by Charo del Genio
Modified: 2018-02-19 19:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New ebuild as per my previous comment (wps-office-10.1.0.5707_alpha21-r2.ebuild,2.83 KB, text/plain)
2018-02-19 11:27 UTC, Charo del Genio
Details
Newer version of the proposed new ebuild (wps-office-10.1.0.5707_alpha21-r2.ebuild,2.89 KB, text/plain)
2018-02-19 15:57 UTC, Charo del Genio
Details
Latest version of proposed ebuild (wps-office-10.1.0.5707_alpha21-r2.ebuild,2.62 KB, text/plain)
2018-02-19 18:46 UTC, Charo del Genio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charo del Genio 2018-02-17 15:52:58 UTC
As per summary, the ebuild for app-office/wps-office-10.1.0.5707_alpha21-r1 has some errors concerning dependencies.

First of all, it is made to depend explicitly on sys-apps/systemd. This is not a needed dependency. Wps-office emerges and works well on non-systemd machines when the line is removed from the ebuild.

Next, it is missing dependencies on media-libs/gstreamer:0.10 and =media-libs/gst-plugins-base-0.10*. These are both needed. In fact, without these packages, wps-office doesn't even start.

In addition, the ebuild has explicit dependencies on toolchain packages (gcc, glibc...), which should not be there.


To summarize, at least media-libs/gstreamer:0.10 and =media-libs/gst-plugins-base-0.10* must be added to RDEPEND, and sys-apps/systemd must be removed from it to ensure functionality. Also, the ebuild could benefit from further cleanup.
Comment 1 Pacho Ramos gentoo-dev 2018-02-18 15:44:30 UTC
gstreamer:0.10 is not needed, I am running it just now without any of that libs... I think I have seen this behavior before: after the removal of gstreamer libs, try uninstalling wps-office completely and later reinstall it

Regarding gcc, glibc and systemd, they are there because it seems wpp and wps binaries are loading some of their libs always
Comment 2 Charo del Genio 2018-02-18 15:56:06 UTC
So, concerning systemd, I'm running it now without it, and I'm having no problems or errors, so I don't understand what you mean there.

As for gstreamer-related stuff, I did exactly as you wrote. After unmerging the old versions of gstreamer and gst-plugins-base I reemerged wps-office, and, as reported above, it simply does not start. The reason seems to be that some of the bundled Qt libraries try to load the 0.10 version of the gstreamer libraries.
Comment 3 Pacho Ramos gentoo-dev 2018-02-18 21:27:15 UTC
It works for me... and all other distributions are not pulling gstreamer-0.10 for wps and look to work too :/
Comment 4 Pacho Ramos gentoo-dev 2018-02-18 21:28:27 UTC
(In reply to Charo del Genio from comment #2)
>I reemerged wps-office,

-> Not re-emerge, fully remove it and reinstall:
After removing gstreamer libs completely
emerge -C wps-office 
(preseve libs would then remove the gst libs)
emerge wps-office
Comment 5 Charo del Genio 2018-02-18 22:37:05 UTC
(In reply to Pacho Ramos from comment #4)
> -> Not re-emerge, fully remove it and reinstall:
> After removing gstreamer libs completely
> emerge -C wps-office 
> (preseve libs would then remove the gst libs)
> emerge wps-office

Just done as you wrote. Result:

paraw@greebo ~ $ /opt/kingsoft/wps-office/office6/wps
Segmentation fault
paraw@greebo ~ $ /opt/kingsoft/wps-office/office6/wpp
Segmentation fault
paraw@greebo ~ $ /opt/kingsoft/wps-office/office6/et
Segmentation fault



Reason:

greebo ~ # ldd /opt/kingsoft/wps-office/office6/libQtWebKit.so.4.9.3 | grep 0\.10
        libgstapp-0.10.so.0 => not found
        libgstinterfaces-0.10.so.0 => not found
        libgstpbutils-0.10.so.0 => not found
        libgstvideo-0.10.so.0 => not found
        libgstbase-0.10.so.0 => not found
        libgstreamer-0.10.so.0 => not found

I don't know why other distributions don't pull gstreamer stuff for wps-office, but chances are users have it anyway due to other packages and just don't notice  the problem.

Now, if I rm /opt/kingsoft/wps-office/office6/libQtWebKit.so.4.9.3, all three pieces of wps-office seem to work, even though I haven't tested them extensively. So maybe a solution is to have the ebuild rm /opt/kingsoft/wps-office/office6/libQtWebKit.so* and introduce a dependency on >=dev-qt/qtwebkit-4.9.3. What do you say?
Comment 6 Pacho Ramos gentoo-dev 2018-02-18 23:14:11 UTC
in my case it works even with that not found libs there... (and some other libs that are also missing) 

Last time I tried to unbundle qtwebkit it was also failing... I don't understand know why it behaves differently :S(In reply to Charo del Genio from comment #5)

> So maybe a solution is to have the ebuild rm
> /opt/kingsoft/wps-office/office6/libQtWebKit.so* and introduce a dependency
> on >=dev-qt/qtwebkit-4.9.3. What do you say?

Are you running an updated system? qtwebkit-4.9.x was dropped some time ago, we only have now qtwebkit-5 :|
Comment 7 Charo del Genio 2018-02-19 00:52:21 UTC
(In reply to Pacho Ramos from comment #6)
> in my case it works even with that not found libs there... (and some other
> libs that are also missing) 
> 
> Last time I tried to unbundle qtwebkit it was also failing... I don't
> understand know why it behaves differently :S(In reply to Charo del Genio
> from comment #5)

OK, here I confess I have no idea...


> > So maybe a solution is to have the ebuild rm
> > /opt/kingsoft/wps-office/office6/libQtWebKit.so* and introduce a dependency
> > on >=dev-qt/qtwebkit-4.9.3. What do you say?
> 
> Are you running an updated system? qtwebkit-4.9.x was dropped some time ago,
> we only have now qtwebkit-5 :|

Yes, I know that. Wps-office bundles that version of qtwebkit, hence my suggestion to use that specific slot for the ebuild.  Anyway, I'm running qtwebkit-5.7.1, as can be seen with...

paraw@greebo ~ $ equery l qtwebkit
 * Searching for qtwebkit ...
[IP-] [  ] dev-qt/qtwebkit-5.7.1:5/5.7

Of course, the explicit dependence in the ebuild doesn't have to be >=dev-qt/qtwebkit-4.9.3, but it could simply be dev-qt/qtwebkit, since it works for sure with slot 5.7 (well... at least on my machines). Oh, BTW, I get the same behaviour on two other different machines, for the record.
Comment 8 Pacho Ramos gentoo-dev 2018-02-19 08:21:16 UTC
that is really strange, this version of wps-office is still qt4 (well... their modified qt bundled libs) , it shouldn't work with qtwebkit-5 
With systemd I can drop the dep if you can check it works for you... but for gstreamer... for now I will keep it as-is until I am able to reproduce the crashes
Comment 9 Pacho Ramos gentoo-dev 2018-02-19 08:27:06 UTC
and I also can run it properly on a second machine I am trying now... Do you have any of this libs in your system?
<<< !needed  sym /usr/lib64/libgstapp-0.10.so.0
<<< !needed  obj /usr/lib64/libgstapp-0.10.so.0.25.0
<<< !needed  sym /usr/lib64/libgstaudio-0.10.so.0
<<< !needed  obj /usr/lib64/libgstaudio-0.10.so.0.25.0
<<< !needed  sym /usr/lib64/libgstbase-0.10.so.0
<<< !needed  obj /usr/lib64/libgstbase-0.10.so.0.30.0
<<< !needed  sym /usr/lib64/libgstinterfaces-0.10.so.0
<<< !needed  obj /usr/lib64/libgstinterfaces-0.10.so.0.25.0
<<< !needed  sym /usr/lib64/libgstpbutils-0.10.so.0
<<< !needed  obj /usr/lib64/libgstpbutils-0.10.so.0.25.0
<<< !needed  sym /usr/lib64/libgstreamer-0.10.so.0
<<< !needed  obj /usr/lib64/libgstreamer-0.10.so.0.30.0
<<< !needed  sym /usr/lib64/libgstvideo-0.10.so.0
<<< !needed  obj /usr/lib64/libgstvideo-0.10.so.0.25.0
<<< !needed  sym /usr/lib64/libphonon.so.4
<<< !needed  obj /usr/lib64/libphonon.so.4.9.1
<<< !needed  sym /usr/lib64/qt4/libQtCore.so.4
<<< !needed  obj /usr/lib64/qt4/libQtCore.so.4.8.7
<<< !needed  sym /usr/lib64/qt4/libQtDBus.so.4
<<< !needed  obj /usr/lib64/qt4/libQtDBus.so.4.8.7
<<< !needed  sym /usr/lib64/qt4/libQtGui.so.4
<<< !needed  obj /usr/lib64/qt4/libQtGui.so.4.8.7

In my setups... all that are removed once wps is uninstalled and later installed again and it runs ok (maybe phonon libs are the problem here... in the past I think that wps was using system phonon over bundled one sometimes) at least having only bundled phonon it seems to work on my setups
Comment 10 Charo del Genio 2018-02-19 10:17:32 UTC
(In reply to Pacho Ramos from comment #9)
> and I also can run it properly on a second machine I am trying now... Do you
> have any of this libs in your system?
> <<< !needed  sym /usr/lib64/libgstapp-0.10.so.0
> <<< !needed  obj /usr/lib64/libgstapp-0.10.so.0.25.0
> <<< !needed  sym /usr/lib64/libgstaudio-0.10.so.0
> <<< !needed  obj /usr/lib64/libgstaudio-0.10.so.0.25.0
> <<< !needed  sym /usr/lib64/libgstbase-0.10.so.0
> <<< !needed  obj /usr/lib64/libgstbase-0.10.so.0.30.0
> <<< !needed  sym /usr/lib64/libgstinterfaces-0.10.so.0
> <<< !needed  obj /usr/lib64/libgstinterfaces-0.10.so.0.25.0
> <<< !needed  sym /usr/lib64/libgstpbutils-0.10.so.0
> <<< !needed  obj /usr/lib64/libgstpbutils-0.10.so.0.25.0
> <<< !needed  sym /usr/lib64/libgstreamer-0.10.so.0
> <<< !needed  obj /usr/lib64/libgstreamer-0.10.so.0.30.0
> <<< !needed  sym /usr/lib64/libgstvideo-0.10.so.0
> <<< !needed  obj /usr/lib64/libgstvideo-0.10.so.0.25.0
> <<< !needed  sym /usr/lib64/libphonon.so.4
> <<< !needed  obj /usr/lib64/libphonon.so.4.9.1
> <<< !needed  sym /usr/lib64/qt4/libQtCore.so.4
> <<< !needed  obj /usr/lib64/qt4/libQtCore.so.4.8.7
> <<< !needed  sym /usr/lib64/qt4/libQtDBus.so.4
> <<< !needed  obj /usr/lib64/qt4/libQtDBus.so.4.8.7
> <<< !needed  sym /usr/lib64/qt4/libQtGui.so.4
> <<< !needed  obj /usr/lib64/qt4/libQtGui.so.4.8.7

Of these, I only have phonon, QtCore, QtDBus and QtGui, which are there due to other packages depending on them.


> In my setups... all that are removed once wps is uninstalled and later
> installed again and it runs ok (maybe phonon libs are the problem here... in
> the past I think that wps was using system phonon over bundled one
> sometimes) at least having only bundled phonon it seems to work on my setups

I don't think so. The reason is that if you ldd all the libraries, you'll see that /opt/kingsoft/wps-office/office6/libkso.so is the only one that calls phonon. In my case, it loads the system one. In your case, when you remove the system one, it still works, which means it falls back on the bundled version. The same thing probably happens with QtCore, and QtDBus. I don't know about QtGui, since wps-office does not ship with a bundled version, but if I remember correctly it only uses it to create cute file selection dialogs, and it uses something else if not available. This would explain why it is not there in the first place. Finally, note that wps-office also ships QtNetwork, QtOpenGL, and QtSvg, all of which could be probably unbundled (see below).

In summary, going back to the original problem, the dependency on systemd is spurious. Then, from an analysis of all the components it looks like the only thing that actually depends on gstreamer:0.10 is the bundled libQtWebKit.so.4.9.3; in turn, the only component that uses QtWebKit is the integrated Flash media player, which can be used to add Flash animations in presentations. After erasing /opt/kingsoft/wps-office/office6/libQtWebKit* everything seems to work fine, but I have not tried the Flash player, so I cannot guarantee that it does not stop working (I don't care much about it, honestly). By the way, this could explain why it appears to work with QtWebKit-5: it simply does not call it at all, since it is only used for a functionality that I haven't tried.

Also, I'm thinking that several libraries can be unbundled, since there are only a few of them that are loaded from /opt/kingsoft/wps-office/office6/ and all the rest is system stuff. In particular:
- libavcodec.so, libavformat.so, libavutil.so, libswresample.so and libswscale.so are provided by media-video/ffmpeg
- libphonon.so.4 is provided by media-libs/phonon:4
- libQtCore.so.4 is provided by dev-qt/qtcore:4
- libQtDBus.so.4 is provided by dev-qt/qtdbus:4
- libQtNetwork.so.4 is provided by dev-qt/qtcore:4
- libQtOpenGL.so is provided by dev-qt/qtopengl:4
- libQtSvg.so is provided by dev-qt/qtsvg:4
- libSDL2.so is provided by media-libs/libsdl2
- libtiff.so.4 is provided by media-libs/tiff:3
All these could be simply removed and dependencies added in the ebuild. Maybe we can also add a dependency on dev-qt/qtgui:4 to be on the safe side. In addition, removing libQtWebKit.so also takes care of gstreamer:0.10 (works for me and for you, so I assume no further problems will come out of it).
I think it's worth trying. What do you say?
Comment 11 Charo del Genio 2018-02-19 11:26:21 UTC
OK, I tried and it turns out that the libs that can be unbundled are only libav*, QtWebKit, QtOpenGL, QtSvg, libSDL2 and libtiff. Phonon, QtCore and QtDBus need to be kept in the bundled version.
I'm adding a modified ebuild as attachment. It gives no problems on my machines, it is without systemd, and I have no gstreamer:0.10 stuff left behind. It seems like this could actually solve all the problems.
Comment 12 Charo del Genio 2018-02-19 11:27:17 UTC
Created attachment 520102 [details]
New ebuild as per my previous comment
Comment 13 Charo del Genio 2018-02-19 15:57:19 UTC
Created attachment 520116 [details]
Newer version of the proposed new ebuild

In the previous version I had forgotten a couple of lines.
Comment 14 Charo del Genio 2018-02-19 18:45:16 UTC
More testing done. On a couple of workstations the previous ebuild still causes crashes when playing videos inside presentations. The difference with the previous computers is that these have nvidia cards and use the closed-source driver because they use the CUDA SDK. The crashes in these cases happen in libGL.so. However, for these machines the solution is apparently to keep all the bundled libraries and only erase libQtWebKit*. This approach also works on the computers I tested it on before, so I guess in the end this is the most conservative solution, since it works on the largest number of machines.
I'm obsoleting the previous attachment and attaching the new one.
Comment 15 Charo del Genio 2018-02-19 18:46:20 UTC
Created attachment 520156 [details]
Latest version of proposed ebuild
Comment 16 Pacho Ramos gentoo-dev 2018-02-19 19:18:35 UTC
(In reply to Charo del Genio from comment #14)
> More testing done. On a couple of workstations the previous ebuild still
> causes crashes when playing videos inside presentations. The difference with
> the previous computers is that these have nvidia cards and use the
> closed-source driver because they use the CUDA SDK. The crashes in these
> cases happen in libGL.so. However, for these machines the solution is
> apparently to keep all the bundled libraries and only erase libQtWebKit*.
> This approach also works on the computers I tested it on before, so I guess
> in the end this is the most conservative solution, since it works on the
> largest number of machines.
> I'm obsoleting the previous attachment and attaching the new one.

Yeah, that is the reason I stopped trying to unbundle libs in the past for this: it looked to work... until it was failing in some corner cases :S
Comment 17 Pacho Ramos gentoo-dev 2018-02-19 19:22:19 UTC
[master 4c3812c89a9] app-office/wps-office: Drop some non really needed deps and try to remove bundled qtwebkit as it doesn't look to be really needed and causes issues in some setups (#647950 by Charo del Genio).
 1 file changed, 134 insertions(+)
 create mode 100644 app-office/wps-office/wps-office-10.1.0.5707_alpha21-r2.ebuild