Bug 151930 - "reference to 'Bool' is ambiguous" compile error in libs/taskmanager
Summary: "reference to 'Bool' is ambiguous" compile error in libs/taskmanager
Status: RESOLVED WORKSFORME
Alias: None
Product: plasma4
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Neundorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 12:16 UTC by Davide Madrisan
Modified: 2009-03-27 21:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Fixes the build of kdebase-workspace (432 bytes, patch)
2008-10-09 03:46 UTC, Silvan Calarco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Madrisan 2007-11-06 12:16:09 UTC
Version:            (using KDE KDE 3.95.0)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 4.2.1 
OS:                Linux

Hi all.
I have the following problem building kdebase-workspace 3.95.0:

Scanning dependencies of target taskmanager
[  4%] Building CXX object libs/taskmanager/CMakeFiles/taskmanager.dir/taskmanager_automoc.o
[  4%] Building CXX object libs/taskmanager/CMakeFiles/taskmanager.dir/taskmanager.o
In file included from /usr/src/RPM/BUILD/kdebase-workspace-3.95.0/libs/taskmanager/taskmanager.cpp:56:
/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
/opt/kde4/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
/opt/kde4/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
/opt/kde4/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
/opt/kde4/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
/opt/kde4/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
/opt/kde4/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
/opt/kde4/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
/opt/kde4/include/fixx11h.h:94: error:                 typedef X::XBool X::Bool
/usr/include/X11/extensions/Xrender.h:213: error: 'Bool' does not name a type
/usr/src/RPM/BUILD/kdebase-workspace-3.95.0/libs/taskmanager/taskmanager.cpp: In member function 'void TaskManager::setXCompositeEnabled(bool)':
/usr/src/RPM/BUILD/kdebase-workspace-3.95.0/libs/taskmanager/taskmanager.cpp:197: error: 'XRenderQueryExtension' was not declared in this scope
make[2]: *** [libs/taskmanager/CMakeFiles/taskmanager.dir/taskmanager.o] Error 1
make[1]: *** [libs/taskmanager/CMakeFiles/taskmanager.dir/all] Error 2
make: *** [all] Error 2

No problem when building the other kde4 core packages (kdelibs, kdepimlibs, kdebase4, kdebase-runtime).
Here are the xorg packages installed on my computer:

libXrender-devel-0.9.4
xorg-proto-devel-7.3

Thanks,
Davide
Comment 1 Alexander Neundorf 2007-11-07 00:38:46 UTC
Ok, this is a problem, but it seems like a problem in fixx11.h from kdelibs (?).
Comment 2 Davide Madrisan 2007-11-07 13:14:18 UTC
Yes, it seems to be a problem with the "Bool" remapping in fixx11h.h
Any idea to fix this issue?
Comment 3 Davide Madrisan 2007-11-23 16:02:29 UTC
Same problem in KDE4 rc1 :(
Please give me a hint to break this issue...

Thanks,
Davide
Comment 4 Alexander Neundorf 2007-11-23 17:26:42 UTC
I think this might belong to plasma.... ?
Comment 5 Aaron J. Seigo 2007-11-26 18:27:36 UTC
the file in question is using fixxx11.h as it should be, and it seems to work pretty well everywhere else. something is not right with fixx11.h on Davide's system. i don't even know where to begin looking and don't really have the time to as it works everywhere else. this really isn't a plasma issue, either, afaict.

Davide: if you simply comment out the fixxll.h line in the file does it work for you? do any other files containing fixx11.h compile foryou?
Comment 6 Davide Madrisan 2007-11-27 09:31:33 UTC
No, it doesn't work. Same problem.
I think because <fixx11h.h> is already included by the header file <netwm.h>

And yes, I've compiled successfully kdelibs and kdepimlibs which make
use of fixx11h.h.


26 Nov 2007 17:27:38 -0000, Aaron J. Seigo <aseigo@kde.org>:
[bugs.kde.org quoted mail]
Comment 7 Alex Merry 2007-12-16 13:19:14 UTC
I think the reason it's tiggered in taskmanager.cpp and nowhere else is that X11/extensions/Xrender.h is only included in one file across kdelibs and kdepimlibs, and that doesn't include fixx11h.h.

You could try playing around with the includes, such as removing or moving fixx11h.h, but I'm not sure what the solution would be as presumably some systems need fixx11h.h there (mine doesn't, but I don't know about older Linuxes or *BSD or Solaris etc.)
Comment 8 Aaron J. Seigo 2007-12-19 06:41:28 UTC
this builds on linux, solaris, bsd... not sure what the problem is here, but i don't think this is a real build issue.
Comment 9 Fredric Johansson 2008-01-20 00:06:23 UTC
I hit this when I tried to install kwin and libtaskmanager for kde4. I managed to get it working by reinstalling some of the X libs and headers:
libXdamage, libXfixes, libXrender,damageproto and renderproto.
I have no clue which one that made it

This was on Gentoo with xorg-server-1.4
Comment 10 Silvan Calarco 2008-10-09 03:46:13 UTC
Created attachment 27752 [details]
Fixes the build of kdebase-workspace
Comment 11 Silvan Calarco 2008-10-09 03:49:34 UTC
I still don't know why this not a general issue, anyway this workaround fixes the build on openmamba.
Comment 12 Timothy Jones 2009-03-27 21:57:15 UTC
I had the same problem with kde-base/plasma-workspace package on gentoo (amd64) installing KDE 4.2.1 (kde-meta:4.2 package)

Following lead in comment #10, I manually modified /usr/include/fixx11h.h by adding line

#include <X11/extensions/Xrender.h>

just before

#ifdef Q_WS_X11

Later had exact same problem with kde-base/kwin:4.2 package until I reapplied the mod to fxixx11h.h (it was overwritten after I reinstalled kdelibs)

TJ