Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 464150 - kde-base/kwin-4.10.1-r2 fails to upgrade from kde-base/kwin-4.9.5
Summary: kde-base/kwin-4.10.1-r2 fails to upgrade from kde-base/kwin-4.9.5
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 04:46 UTC by Martin Väth
Modified: 2013-05-04 08:18 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2013-04-02 04:46:45 UTC
When upgrading from kwin-4.9.5, kde-base/kwin-4.10.1-r2 fails with the misleading errors:

../../../kwin-4.10.1/kwin/libkwineffects/kwinglutils_funcs.h:33:37: error: variable or field 'glResolveFunctions' declared void
../../../kwin-4.10.1/kwin/libkwineffects/kwinglutils_funcs.h 33:37: error: 'OpenGLPlatformInterface' was not declared in this scope

(Actually the compilation should fail with all USE-flag combinations, so I wonder how kde-4.10.1 could have become stable...)

The error comes from kwinglutils_funcs.h containing the line
#include <kwinglobals.h>
which apparently reads /usr/include/kwinglobals.h from the previous install of kwin - in kwin-4.9.5 that file does not contain the definition of the enum OpenGLPlatformInterface, only the new file kwin/libkwineffects/kwinglobals.h does.
(Actually, also some other [presumably buggy] #include lines of the same type are contained in kwin/libkwineffects/kwinglutils_funcs.h, but at least concerning compilation with kde-4.9.5 installed they make no harm.)

Patching that #include line(s) is probably not a good idea, since kwinglutils_funcs.h will be installed.

Moving the old /usr/include/kwinglobals.h out of the way before compiling and then emerging twice works (to be safe, I have set CCACHE_RECACHE=1 the second time), but this is not a nice solution for users, of course.

The better solution would probably be to fix the order of include directories, but I am not familiar enough with the build system to suggest a corresponding patch quickly. (Moreover, I am not motivated, since the above hackish workaround worked for me...)
Comment 1 Michael Palimaka (kensington) gentoo-dev 2013-04-02 10:58:51 UTC
Is that to say that it failed with ccache, but worked without?
Comment 2 Martin Väth 2013-04-03 05:34:19 UTC
(In reply to comment #1)
> Is that to say that it failed with ccache, but worked without?

No, ccache has nothing to do with the bug.
I wrote this only in case somebody wants to repeat my hack, uses ccache, and wants to be completely on the safe side (probably, it is not even necessary
to compile a second time).

(I considered the bug as major, because startkde depends on kwin, and so
a kde-based system becomes practically broken in the middle of an upgrade.)
Comment 3 Johannes Huber (RETIRED) gentoo-dev 2013-05-03 18:48:27 UTC
I updated last week my netbook, works for me. kde-stable team had done the same. I guess its ccache related and ccache is evil as we all known.
Comment 4 Martin Väth 2013-05-04 07:34:32 UTC
(In reply to comment #3)
> I guess its ccache related and ccache is evil as we all known.

It is definitely not ccache related.

I have analyzed and desribed the cause, please read it:
The header file kwinglobals.h is read from the installed version instead of
from the new version, because there is #include <...> instead of
#include "..." in kwinglutils_funcs.h (which, however, must not just be
patched into kwinglutils_funcs.h, because the latter is installed
and thus probably needs the #include <...> for other programs using that file).

It presumable works if for whatever reason you had already a newer
version of kwin than 4.9.5. Maybe it also does not occur with certain 
useflags combinations (if e.g. #include "kwinglobals.h" occurs before
the include of kwinglutils_funcs.h in a compilation unit there is no
problem - I did not check carefully in which combinations this is the
case, but obviously not in all).

Maybe the problem was fixed in kwin-4.10.2 which now is stable.
Of course, I did not downgrade just to test it.
Comment 5 Martin Väth 2013-05-04 08:18:35 UTC
Just for the record: My USE for kdewin are opengl -aqua -debug -gles