Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344293 - x11-wm/compiz-0.8* compilation fails with x11-libs/gtk+-2.22* with >= portage-2.2.0_alpha2 on amd64
Summary: x11-wm/compiz-0.8* compilation fails with x11-libs/gtk+-2.22* with >= portage...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Desktop-Effects herd
URL: http://cgit.compiz.org/compiz/core/lo...
Whiteboard:
Keywords:
Depends on:
Blocks: gtk-2.22
  Show dependency tree
 
Reported: 2010-11-05 17:33 UTC by Mr. B
Modified: 2010-12-06 23:42 UTC (History)
4 users (show)

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


Attachments
Patch one of two, replacing deprecated and removed GDK functions (compiz_gdk-deprecation-1.patch,4.43 KB, patch)
2010-11-05 17:34 UTC, Mr. B
Details | Diff
Patch two of two, replacing deprecated and removed GDK functions (compiz_gdk-deprecation-2.patch,3.22 KB, patch)
2010-11-05 17:35 UTC, Mr. B
Details | Diff
compiz-0.8.6-gdk-display-deprecated.patch (compiz-0.8.6-gdk-display-deprecated.patch,3.30 KB, patch)
2010-11-06 01:16 UTC, Mike Auty (RETIRED)
Details | Diff
Compilation Log (x11-wm:compiz-0.8.6-r3:20101205-052229.log,149.03 KB, text/plain)
2010-12-05 22:21 UTC, Ivan Mak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mr. B 2010-11-05 17:33:36 UTC
With gtk+ 2.22 installed, compiz-0.8* fails to compile due to removed gdk functions.

The attached two patches, written by Danny Baumann, caused compilation of 0.8.6-r1 to succeed. compiz seems to be functioning without complication, albeit with uber memory leakage.
Comment 1 Mr. B 2010-11-05 17:34:59 UTC
Created attachment 253309 [details, diff]
Patch one of two, replacing deprecated and removed GDK functions
Comment 2 Mr. B 2010-11-05 17:35:20 UTC
Created attachment 253311 [details, diff]
Patch two of two, replacing deprecated and removed GDK functions
Comment 3 Mike Auty (RETIRED) gentoo-dev 2010-11-06 01:16:45 UTC
Created attachment 253359 [details, diff]
compiz-0.8.6-gdk-display-deprecated.patch

There's a couple other places both suggesting (the same) single patch that seems a little tidier/doesn't change gdk_display for cairo, but for the proper (non-deprecated) gdk_display calls.

http://osdir.com/ml/general/2010-10/msg26743.html
http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg234872.html
Comment 4 Mike Auty (RETIRED) gentoo-dev 2010-11-06 01:18:14 UTC
In fact, this patch appears to have been commited into compiz here:

http://gitweb.compiz.org/?p=compiz%2Fcore;a=commitdiff_plain;h=5ea5e2130c56d405fcccd63932918fc49ca1f1b9

so it's probably the right one to go for.
Comment 5 Mr. B 2010-11-09 13:11:24 UTC
(In reply to comment #4)
> In fact, this patch appears to have been commited into compiz here:
> 
> http://gitweb.compiz.org/?p=compiz%2Fcore;a=commitdiff_plain;h=5ea5e2130c56d405fcccd63932918fc49ca1f1b9
> 
> so it's probably the right one to go for.
> 
That would be the second patch. ;)

I just applied all changes relating to GDK deprecation locally and the result worked. If only one is required, all the better.

Can someone commit this?
Comment 6 xenon 2010-11-11 15:01:23 UTC
The patch works, but in my amd64 system, with portage 2.2.0_alpha2, portage refuses to install the package because of the poor programming practice notices. I couldn't force it to install, despite not having the "strict" nor the "stricter" portage features enabled, and the VERY_BRAVE_OR_VERY_DUMB environment variable did not help.

What worked was to include the following header file:
/usr/include/gtk-2.0/gdk/gdkgc.h
in gtk-window-decorator.c

Credit for this fix goes to MadCow108 from the Ubuntu forums.
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2010-12-04 13:49:11 UTC
patch works here too. Can we get it to the tree, please?
Comment 8 Mike Auty (RETIRED) gentoo-dev 2010-12-04 19:10:06 UTC
Ok, I've just committed this, but I don't have a system running an old gtk, so I've no idea if this will cause problems for them.  I guess we'll have to wait for the bug reports to roll in...  5:\
Comment 9 Ivan Mak 2010-12-05 22:21:47 UTC
Created attachment 256445 [details]
Compilation Log

Still failing to compile over here. 

Even with gdk/gdkgc.h included in file windowdecorator.c, Portage-2.2 still complains about poor programming practice when using gtk+-2.22
Comment 10 Mike Auty (RETIRED) gentoo-dev 2010-12-05 23:41:29 UTC
Ok, well, if anyone knows the proper fix for this, I'll be happy to apply the appropriate changes.  Note though, that I don't have an amd64 architecture to test this on.  I've reopened the bug in the interim.
Comment 11 xenon 2010-12-06 14:03:57 UTC
Technically, it's not failing to compile, but portage refuses to install the package due to those "programming practice" issues.

Here (amd64, portage 2.2.0_alpha6) compiz-0.8.6-r3 compiles AND installs, when I add the include mentioned in comment #6.

In detail, I added the following exact line:

#include "/usr/include/gtk-2.0/gdk/gdkgc.h"

in line 25 of file gtk-window-decorator.c, just above the existing line:
#include "decoration.h"

Ivan from comment #9, could you please try again following these exact instructions? Whether this procedure should become the definitive fix for the package, I don't know, but I'm curious about why it's not working for you.


(In reply to comment #9)
> Created an attachment (id=256445) [details]
> Compilation Log
> 
> Still failing to compile over here. 
> 
> Even with gdk/gdkgc.h included in file windowdecorator.c, Portage-2.2 still
> complains about poor programming practice when using gtk+-2.22
> 

Comment 12 Mike Auty (RETIRED) gentoo-dev 2010-12-06 14:25:47 UTC
Xenon, if you check the patch that's in portage[1], you'll see that on line 9 there is already a #include <gdk/gdkgc.h> at the top of gtk-window-decorator. Hard coding the explicit path to gdkgc would not be a valid solution since the file may not reside there on all user's machines.  Could you please check that compiz-0.8.6-r3 compiles and installs fine on your machine?  If so, then you two are obviously suffering different problems.  If not, then we need to figure out why hard-coding the patch to the specified file works on one machine, but using the include paths automatically doesn't produce an error such as "file not found" on any other machine...

[1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-wm/compiz/files/compiz-0.8.6-gdk-display-deprecated.patch?revision=1.1&view=markup
Comment 13 xenon 2010-12-06 14:45:07 UTC
I have successfully compiled and installed compiz-0.8.6-r3 before writing my previous comment, following the procedure detailed in the comment itself.
Without manually adding the include, I get the same negative result as Ivan.

Now I just tried not adding the explicit gdkgc include line, but moving the one provided by the patch to the position I suggested in my comment, and it worked (got a non-blocking QA notice but portage installed the package).
I guess this could be a valid solution. What do you think?

(In reply to comment #12)
> Xenon, if you check the patch that's in portage[1], you'll see that on line 9
> there is already a #include <gdk/gdkgc.h> at the top of gtk-window-decorator.
> Hard coding the explicit path to gdkgc would not be a valid solution since the
> file may not reside there on all user's machines.  Could you please check that
> compiz-0.8.6-r3 compiles and installs fine on your machine?  If so, then you
> two are obviously suffering different problems.  If not, then we need to figure
> out why hard-coding the patch to the specified file works on one machine, but
> using the include paths automatically doesn't produce an error such as "file
> not found" on any other machine...
> 
> [1]
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-wm/compiz/files/compiz-0.8.6-gdk-display-deprecated.patch?revision=1.1&view=markup
> 

Comment 14 Mike Auty (RETIRED) gentoo-dev 2010-12-06 22:17:16 UTC
Ok, it looks as though including it after defining GDK_DISABLE_DEPRECATED is the only difference between putting it lower down (with the other gdk includes) and putting it higher up.  That suggests that we'll now be mixing some deprecated functionality with non-deprecated functionality, which means this is a temporary fix that'll come back to bite us.  Hopefully 0.9 will be stable enough not to segfault all the time by then.

In the meantime I've altered the patch, and since this only affects whether people can install the program or not, I haven't bumped the revision number.  If you haven't been able to install compiz-0.8.6-r3, please try again.

Marking this as FIXED, feel free to reopen or comment if it hasn't solved the problem.
Comment 15 xenon 2010-12-06 23:42:28 UTC
Personally, I think every time an ebuild, its patches or anything else in the portage/category/package directory changes there should be a revision bump, so that people who tried to install a package without success (but don't closely follow bugs like this) are easily notified that there's "new hope", so to say.

This said, I agree with what you said.