Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263823 - x11-proto/renderproto-0.9.3-r1 breaks compilation of KDE4 stuff
Summary: x11-proto/renderproto-0.9.3-r1 breaks compilation of KDE4 stuff
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 03:05 UTC by Maciej Mrozowski
Modified: 2009-06-19 14:00 UTC (History)
3 users (show)

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


Attachments
a bit of log from #kde-devel - related to Xlib+Xdefs includes issues (irc.log,14.46 KB, text/plain)
2009-03-26 17:49 UTC, Maciej Mrozowski
Details
test case (test.cpp,123 bytes, text/plain)
2009-03-27 00:50 UTC, Maciej Mrozowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Mrozowski gentoo-dev 2009-03-26 03:05:18 UTC
with example of plasma-workspace-4.2.1-r1.
Reverting update (using =renderproto-0.9.3) 'fixes' this issue.

I'm running stable amd64 with exeptions being:
- portage
- glibc/gcc and its deps
- baselayout2 and its deps
- xorg-server-1.5.3-r3 (from portage)
- KDE-4.2.1 (from portage)

emerge --info
Portage 2.2_rc27 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.27-gentoo-r8 x86_64)
=================================================================                                        
System uname: Linux-2.6.27-gentoo-r8-x86_64-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-glibc2.2.5            
Timestamp of tree: Thu, 26 Mar 2009 01:25:02 +0000                                                       
ccache version 2.4 [enabled]                                                                             
app-shells/bash:     3.2_p39                                                                             
dev-java/java-config: 2.1.7                                                                              
dev-lang/python:     2.5.2-r7                                                                            
dev-util/ccache:     2.4-r7                                                                              
dev-util/cmake:      2.6.3-r1                                                                            
sys-apps/baselayout: 2.0.0                                                                               
sys-apps/openrc:     0.4.3-r1                                                                            
sys-apps/sandbox:    1.6                                                                                 
sys-devel/autoconf:  2.13, 2.63                                                                          
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                                
sys-devel/binutils:  2.18-r3                                                                             
sys-devel/gcc-config: 1.4.0-r4                                                                           
sys-devel/libtool:   1.5.26                                                                              
virtual/os-headers:  2.6.27-r2                                                                           
ACCEPT_KEYWORDS="amd64"                                                                                  
CBUILD="x86_64-pc-linux-gnu"                                                                             
CFLAGS="-march=nocona -O2 -pipe -msse3 -ftree-vectorize"                                                 
CHOST="x86_64-pc-linux-gnu"                                                                              
CONFIG_PROTECT="/etc /usr/share/config"                                                                  
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"                                              
CXXFLAGS="-march=nocona -O2 -pipe -msse3 -ftree-vectorize"                                                      
DISTDIR="/usr/portage/distfiles"                                                                                
EMERGE_DEFAULT_OPTS="--deep --changelog"                                                                        
FEATURES="ccache collision-protect distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"                                    
GENTOO_MIRRORS="http://ftp.vectranet.pl/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo"        
LANG="pl_PL.utf8"                                                                                               
LC_ALL="pl_PL.utf8"                                                                                             
LDFLAGS="-Wl,--as-needed"                                                                                       
MAKEOPTS="-j2"                                                                                                  
PKGDIR="/usr/portage/packages"                                                                                  
PORTAGE_CONFIGROOT="/"                                                                                          
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                  
PORTAGE_TMPDIR="/var/tmp"                                                                                       
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/reavertm /usr/local/portage/kde-testing /usr/local/portage/qting-edge"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="7zip X a52 aac accessibility ace acpi additions alsa amd64 apache2 archive autoipd bash-completion bittorrent branding bzip2 cdaudio cddb chm cli clucene colordiff cracklib crypt cups curl dbus designer-plugin dirac divx dri dv dvd dvdr dvdread dynamic encode exif exiv2 ffmpeg flac fontconfig ftp gadu gcj gd gif glibc-omitfp gnokii gphoto2 hal history iconv inotify isdnlog java5 javascript jpeg kde kdeenablefinal kdehiddenvisibility kdexdeltas kickoff libgadu lm_sensors lzma lzo mad mbox midi mng mp3 mplayer mudflap multilib ncurses no-net2 nolvm1 nonfsv4 nptl nptlonly ogg openal openexr opengl openmp pam pch pcre pdf pg-intdatetime plasma png pppd qt3support qt4 quicktime rar rdesktop readline reiserfs rtc semantic-desktop session sha512 sms sndfile sockets spell splsrt sse sse2 ssl svg symlink sysfs theora threads threadsonly tiff toolkit-scroll-bars truetype unicode urandomusb utempter vhosts vnc voice vorbis webkit x264 xattr xcomposite xorg xpm xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd     authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile     authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd     deflate dir disk_cache env expires ext_filter file_cache filter headers ident     imagemap include info log_config logio mem_cache mime mime_magic negotiation     proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so     speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Relevant part of build log:

Scanning dependencies of target kdeinit_plasma_qgv                                                              
[ 83%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/kdeinit_plasma_qgv_automoc.o 
[ 83%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/backgrounddialog.o           
[ 83%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/dashboardview.o              
[ 84%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/desktopcorona.o              
[ 84%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/desktopview.o                
[ 84%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/main.o                       
[ 84%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/panelcontroller.o            
[ 85%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/panelview.o                  
[ 85%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/panelappletoverlay.o         
[ 85%] Building CXX object plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/plasmaapp.o                  
In file included from /var/tmp/portage/kde-base/plasma-workspace-4.2.1-r1/work/plasma-workspace-4.2.1/plasma/shells/desktop/plasmaapp.cpp:73:                                                                                   
/usr/include/X11/extensions/Xrender.h:75: error: reference to 'Bool' is ambiguous                               
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:75: error: reference to 'Bool' is ambiguous                               
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:75: error: 'Bool' does not name a type                                    
/usr/include/X11/extensions/Xrender.h:80: error: reference to 'Bool' is ambiguous                               
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:80: error: reference to 'Bool' is ambiguous                               
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:80: error: 'Bool' does not name a type                                    
/usr/include/X11/extensions/Xrender.h:203: error: reference to 'Bool' is ambiguous                              
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:203: error: reference to 'Bool' is ambiguous                              
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:203: error: 'Bool' does not name a type                                   
/usr/include/X11/extensions/Xrender.h:213: error: reference to 'Bool' is ambiguous                              
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:213: error: reference to 'Bool' is ambiguous                              
/usr/include/X11/Xdefs.h:49: error: candidates are: typedef int Bool                                            
/usr/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool                                      
/usr/include/X11/extensions/Xrender.h:213: error: 'Bool' does not name a type                                   
/var/tmp/portage/kde-base/plasma-workspace-4.2.1-r1/work/plasma-workspace-4.2.1/plasma/shells/desktop/plasmaapp.cpp: In function 'void checkComposite()':
/var/tmp/portage/kde-base/plasma-workspace-4.2.1-r1/work/plasma-workspace-4.2.1/plasma/shells/desktop/plasmaapp.cpp:94: error: 'XRenderQueryExtension' was not declared in this scope
make[2]: *** [plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/plasmaapp.o] Error 1
make[1]: *** [plasma/shells/desktop/CMakeFiles/kdeinit_plasma_qgv.dir/all] Error 2
Comment 1 Maciej Mrozowski gentoo-dev 2009-03-26 03:06:53 UTC
xorg-server-1.5.3-r5 that is..

Please fix this before we get new ~100 bugs assigned to KDE team :)
Comment 2 Rafał Mużyło 2009-03-26 14:35:28 UTC
Why do I get the feeling, that /usr/include/fixx11h.h
is a KDE hack, fixing a problem similar to that 0.9.3-r1
did ?
KDE autotools hacks were a pain, yet more of the same ?

That of course proves only that:
- more than one community considered many X headers broken,
due to missing includes
- KDE people should learn writing better hacks
Comment 3 Maciej Mrozowski gentoo-dev 2009-03-26 15:45:42 UTC
Good spot, I'll investigate kdelibs then
Comment 4 Maciej Mrozowski gentoo-dev 2009-03-26 17:49:15 UTC
Created attachment 186331 [details]
a bit of log from #kde-devel - related to Xlib+Xdefs includes issues

Maybe it will need better cleanup in Xlib.h as well.
Comment 5 Maciej Mrozowski gentoo-dev 2009-03-26 19:53:01 UTC
Index: kdeui/util/fixx11h.h
===================================================================
--- kdeui/util/fixx11h.h	(revision 945040)
+++ kdeui/util/fixx11h.h	(working copy)
@@ -92,8 +92,8 @@
 typedef Bool XBool;
 #undef Bool
 typedef XBool Bool;
+#define Bool XBool
 #endif
-#undef Bool
 #endif
 // template <---


Seems to do the trick
Comment 6 Maciej Mrozowski gentoo-dev 2009-03-26 21:46:03 UTC
Well, it does the trick for kde4 apps, but breaks building of kdelibs itself!
Upstream (KDE) should reorder includes to make fixx11h.h be included as last one...

[ 17%] Building CXX object kdeui/CMakeFiles/kdeui.dir/util/kmanagerselection.o                                  
In file included from /usr/include/qt4/QtCore/qvariant.h:50,                                                    
                 from /usr/include/qt4/QtCore/QVariant:1,                                                       
                 from /var/tmp/portage/kde-base/kdelibs-4.2.1-r4/work/kdelibs-4.2.1/kdecore/config/kconfig.h:32,
                 from /var/tmp/portage/kde-base/kdelibs-4.2.1-r4/work/kdelibs-4.2.1/kdecore/config/ksharedconfig.h:25,                                                                                                          
                 from /var/tmp/portage/kde-base/kdelibs-4.2.1-r4/work/kdelibs-4.2.1/kdecore/kernel/kcomponentdata.h:23,                                                                                                         
                 from /var/tmp/portage/kde-base/kdelibs-4.2.1-r4/work/kdelibs-4.2.1/kdeui/kernel/kapplication.h:45,                                                                                                             
                 from /var/tmp/portage/kde-base/kdelibs-4.2.1-r4/work/kdelibs-4.2.1/kdeui/util/kmanagerselection.cpp:47:                                                                                                        
/usr/include/qt4/QtCore/qmetatype.h:55:2: error: #error qmetatype.h must be included before any header file that defines Bool
Comment 7 Maciej Mrozowski gentoo-dev 2009-03-27 00:34:40 UTC
As disabling this Bool-related hackery in fixx11h.h doesn't work as well and I have no working and reliable solution so far, I'd suggest to mask renderproto-0.9.3-r1 in profile for now.
It's clearly upstream (KDE) issue, following sequence of includes break any KDE$ application using Bool type:

#include <Xlib.h>  // for #define Bool int definition
#include <fixx11h.h> // to redefine Bool using typedef this time, and undefine Bool as macro...
#include <Xdefs.h>  // to define Bool using typedef only when Bool is not defined as macro...

// using Bool type causes compilation errors due to Bool symbol being ambiguous.
Comment 8 Maciej Mrozowski gentoo-dev 2009-03-27 00:50:38 UTC
Created attachment 186370 [details]
test case
Comment 9 Maciej Mrozowski gentoo-dev 2009-03-28 00:24:03 UTC
Fixed in trunk, by David Faure (KDE)
http://websvn.kde.org:80/?view=rev&revision=945494
Comment 10 Erik Wasser 2009-04-27 10:12:17 UTC
I'm talking about the lines from "/usr/portage/profiles/package.mask":

> # Peter Alfredsen <loki_val@gentoo.org> (27 Mar 2009)
> # Breaks compilation of KDE4 packages - bug 263823
> =x11-proto/renderproto-0.9.3-r1

I'm using still KDE 3.5.9 and I want to recompile my openoffice-3.0.0. This doesn't work because of the following line:

> checking whether Xrender.h defines PictStandardA8... configure: error: no, X 
> headers too old.

The error message is of course misleading. B-)

The compilation of openoffice breaks because of the line "#include <X11/extensions/Xrender.h>" that will include "X11/extensions/render.h". See https://bugs.freedesktop.org/show_bug.cgi?id=12578 more details.

So...

renderproto-0.9.3-r1 breaks KDE4 stuff
and
renderproto-0.9.3 breaks normal stuff
Comment 11 Maciej Mrozowski gentoo-dev 2009-05-19 01:56:39 UTC
Patch for kdelibs-4.2.3 is in Portage, so I guess renderproto-0.9.3-r1 may be unmasked in profile again.
Comment 12 Maciej Mrozowski gentoo-dev 2009-05-20 00:06:29 UTC
I have it unmasked for some time on my ~amd64 chroot, emerged gnome, kde3 and multiple kde4's there with no issue.

Please unmask '=renderproto-0.9.3-r1' in profile.
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2009-05-20 08:06:38 UTC
Actually, please don't do that. I will remove -r1 from portage because it just breaks too much stuff.

Apps that want to #include <X11/extensions/render{,proto}.h> will have to #include <X11/extensions/Xrender.h> as well.

Yes the headers are _broken_, upstream knows about it, but _really_ fixing this bug means changing almost all apps that include X headers, including Qt itself.

I will reopen bug #238665 so xulrunner can fix the bug.

Long story short, 0.9.3-r1 will leave portage.

Thanks
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2009-06-19 14:00:08 UTC
Alright, I've removed the masked version. We won't muck with X headers again :)

Thanks