KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
135830
:
Compile error in KPrMSPresentationSetup.cpp rel...
P
roduct
:
kpresenter
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
unspecified
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2006-10-17 19:07
Last Changed:
2006-10-18 23:03:44
Version: 1.6.0 (using KDE KDE 3.5.5) Installed from: Compiled From Sources Compiler: gcc 4.0.3 OS: Solaris I get the following when trying to compile KOffice 1.6.0: /usr/include/X11/Xutil.h:117: error: 'Bool' does not name a type /usr/include/X11/Xutil.h:120: error: 'Pixmap' does not name a type /usr/include/X11/Xutil.h:121: error: 'Window' does not name a type /usr/include/X11/Xutil.h:123: error: 'Pixmap' does not name a type /usr/include/X11/Xutil.h:124: error: 'XID' does not name a type /usr/include/X11/Xutil.h:207: error: 'XPointer' does not name a type /usr/include/X11/Xutil.h:254: error: expected ';' before '*' token /usr/include/X11/Xutil.h:255: error: 'VisualID' does not name a type /usr/include/X11/Xutil.h:287: error: 'Colormap' does not name a type /usr/include/X11/Xutil.h:295: error: 'VisualID' does not name a type /usr/include/X11/Xutil.h:296: error: 'XID' does not name a type /usr/include/X11/Xutil.h:332: error: expected constructor, destructor, or type c onversion before 'extern' /usr/include/X11/Xutil.h:417: error: 'Status' does not name a type /usr/include/X11/Xutil.h:425: error: 'Status' does not name a type /usr/include/X11/Xutil.h:434: error: 'Status' does not name a type /usr/include/X11/Xutil.h:442: error: 'Status' does not name a type /usr/include/X11/Xutil.h:452: error: 'Status' does not name a type /usr/include/X11/Xutil.h:461: error: 'Status' does not name a type /usr/include/X11/Xutil.h:470: error: 'Status' does not name a type /usr/include/X11/Xutil.h:488: error: 'Status' does not name a type /usr/include/X11/Xutil.h:503: error: 'Status' does not name a type /usr/include/X11/Xutil.h:511: error: 'Status' does not name a type /usr/include/X11/Xutil.h:519: error: 'Status' does not name a type /usr/include/X11/Xutil.h:528: error: 'Status' does not name a type /usr/include/X11/Xutil.h:538: error: 'Status' does not name a type /usr/include/X11/Xutil.h:572: error: 'Status' does not name a type /usr/include/X11/Xutil.h:590: error: 'Bool' does not name a type /usr/include/X11/Xutil.h:801: error: 'Status' does not name a type /usr/include/X11/Xutil.h:843: error: 'Status' does not name a type /usr/local/lib/kde-3.5/include/fixx11h.h:31: error: expected constructor, destru ctor, or type conversion before 'namespace' /usr/local/lib/kde-3.5/include/fixx11h.h:233: error: 'X' is not a namespace-name /usr/local/lib/kde-3.5/include/fixx11h.h:233: error: expected namespace-name bef ore ';' token KPrView.cpp: In function 'void enableDPMS(bool)': KPrView.cpp:216: error: 'DPMSQueryExtension' was not declared in this scope KPrView.cpp:217: error: 'DPMSCapable' was not declared in this scope KPrView.cpp:220: error: 'DPMSEnable' was not declared in this scope KPrView.cpp:223: error: 'DPMSDisable' was not declared in this scope KPrView.cpp:228: error: 'XFlush' was not declared in this scope KPrView.cpp: In function 'bool isDPMSEnabled()': KPrView.cpp:240: error: 'CARD16' was not declared in this scope KPrView.cpp:240: error: expected `;' before 'x_standby' KPrView.cpp:241: error: expected `;' before 'x_suspend' KPrView.cpp:242: error: expected `;' before 'x_off' KPrView.cpp:244: error: 'DPMSQueryExtension' was not declared in this scope KPrView.cpp:245: error: 'DPMSCapable' was not declared in this scope KPrView.cpp:246: error: 'x_standby' was not declared in this scope KPrView.cpp:246: error: 'x_suspend' was not declared in this scope KPrView.cpp:246: error: 'x_off' was not declared in this scope KPrView.cpp:246: error: 'DPMSGetTimeouts' was not declared in this scope In file included from KPrView.h:25, from KPrMSPresentationSetup.cpp:27: ../config.h:313:1: warning: "_FILE_OFFSET_BITS" redefined In file included from /usr/include/iso/string_iso.h:31, from /usr/local/lib/gcc/lib/gcc/sparc-sun-solaris2.8/4.0.3/incl ude/string.h:27, from /usr/local/lib/qt-3.3/include/qcstring.h:46, from /usr/local/lib/qt-3.3/include/qstring.h:42, from /usr/local/lib/qt-3.3/include/qwindowdefs.h:44, from /usr/local/lib/qt-3.3/include/qwidget.h:42, from /usr/local/lib/qt-3.3/include/qdialog.h:42, from /usr/local/lib/qt-3.3/include/qwizard.h:43, from /usr/local/lib/kde-3.5/include/kwizard.h:26, from KPrMSPresentationSetup.h:26, from KPrMSPresentationSetup.cpp:25: /usr/local/lib/gcc/lib/gcc/sparc-sun-solaris2.8/4.0.3/include/sys/feature_tests. h:105:1: warning: this is the location of the previous definition gmake[3]: *** [KPrView.lo] Error 1 gmake[3]: *** Waiting for unfinished jobs.... gmake[3]: Leaving directory `/software/work/packages/BUILD/koffice-1.6.0/kpresen ter' Last known version to compile without errors is KOffice 1.5.2.
Comment
#1
David Faure 2006-10-17 20:40:20
Is that really the first error? /usr/include/X11/Xutil.h:117: error: 'Bool' does not name a type This is surprising... Does this help? --- KPrView.cpp (revision 596147) +++ KPrView.cpp (working copy) @@ -203,6 +203,7 @@ static const char * const pagedown_xpm[] }; #ifdef HAVE_DPMS +#include <fixx11h.h> #include <X11/Xutil.h> #include <X11/extensions/dpms.h> #include <fixx11h.h>
Comment
#2
Jens Hatlak 2006-10-17 22:04:22
First error: Yes. Does the patch help: No. BUT this is a line from the start of Solaris' Xutil.h: /* You must include <X11/Xlib.h> before including this file */ Sounds familiar... I remember having suffered from that in the past. Now inserting #include <X11/Xlib.h> before #include <X11/Xutil.h> makes the first bunch of error disappear; the new first error line is: KPrView.cpp: In function 'void enableDPMS(bool)': So, please check if including Xlib.h needs a check for other platforms or if it can be included in all cases. After that we'll have to deal with the next set of errors.
Comment
#3
David Faure 2006-10-17 22:49:56
On Tuesday 17 October 2006 22:04, Jens Hatlak wrote:
> /* You must include <X11/Xlib.h> before including this file */
Ah!
> Now inserting > #include <X11/Xlib.h> > before > #include <X11/Xutil.h>
OK that makes sense. It's done that way in kdebase files, so it's fine to add it.
> makes the first bunch of error disappear; the new first error line is: > KPrView.cpp: In function 'void enableDPMS(bool)':
And what's the line below that?
Comment
#4
Jens Hatlak 2006-10-18 00:08:41
Concerning the next few lines, see my initial comment, about half way through: KPrView.cpp: In function 'void enableDPMS(bool)': KPrView.cpp:216: error: 'DPMSQueryExtension' was not declared in this scope KPrView.cpp:217: error: 'DPMSCapable' was not declared in this scope KPrView.cpp:220: error: 'DPMSEnable' was not declared in this scope KPrView.cpp:223: error: 'DPMSDisable' was not declared in this scope KPrView.cpp:228: error: 'XFlush' was not declared in this scope KPrView.cpp: In function 'bool isDPMSEnabled()': KPrView.cpp:240: error: 'CARD16' was not declared in this scope KPrView.cpp:240: error: expected `;' before 'x_standby' KPrView.cpp:241: error: expected `;' before 'x_suspend' KPrView.cpp:242: error: expected `;' before 'x_off' KPrView.cpp:244: error: 'DPMSQueryExtension' was not declared in this scope KPrView.cpp:245: error: 'DPMSCapable' was not declared in this scope KPrView.cpp:246: error: 'x_standby' was not declared in this scope KPrView.cpp:246: error: 'x_suspend' was not declared in this scope KPrView.cpp:246: error: 'x_off' was not declared in this scope KPrView.cpp:246: error: 'DPMSGetTimeouts' was not declared in this scope
Comment
#5
David Faure 2006-10-18 00:18:42
On Wednesday 18 October 2006 00:08, Jens Hatlak wrote:
> KPrView.cpp:216: error: 'DPMSQueryExtension' was not declared in this scope
Is that not defined in X11/extensions/dpms.h?
Comment
#6
Jens Hatlak 2006-10-18 01:12:43
No, this is all the contents of that file on my machine (leaving out comments): #define DPMSModeOn 0 #define DPMSModeStandby 1 #define DPMSModeSuspend 2 #define DPMSModeOff 3
Comment
#7
David Faure 2006-10-18 11:36:52
OK then HAVE_DPMS should not be set for you. The bug is in the configure check. Can you check that HAVE_DPMS is defined in koffice/config.h - but not in kdebase/config.h , if you also compiled kdebase? Otherwise you would have gotten similar problems in kdebase... The code for the configure check is in koffice/kpresenter/configure.in.in The test program tries to link a program that uses DPMSSetTimeouts.... Hmm, maybe you do have the DPMS stuff but in another header? X11/Xproto.h maybe?
Comment
#8
Jens Hatlak 2006-10-18 12:17:59
There are some further defines in X11/extensions/dpmsstr.h (like X_DPMSCapable), but those listed in the error output from the previous comments, like DPMSQueryExtension, are nowhere to be found in /usr/include. Unlike koffice, kdebase also checks for DPMSCapable and DPMSInfo: configure:42622: checking for DPMS configure:42662: gcc -o conftest -O2 -I/usr/openwin/include -DQT_THREAD_SUPPO RT -I/usr/local/include -I/usr/openwin/include -D_REENTRANT -D_POSIX_PTHREAD_SEM ANTICS -DUSE_SOLARIS -DSVR4 -L/usr/local/lib/qt-3.3/lib-g++3 -R/usr/local/lib/qt -3.3/lib-g++3 -L/usr/openwin/lib -R/usr/openwin/lib -L/usr/local/lib -R/usr/loca l/lib -L/usr/local/lib/kde-3.5/lib -L/usr/local/lib/qt-3.3/lib -L/usr/openwin/l ib conftest.c -lX11 -lXext -lsocket -lnsl >&5 configure:42668: $? = 0 configure:42672: test -z || test ! -s conftest.err configure:42675: $? = 0 configure:42678: test -s conftest configure:42681: $? = 0 configure:42780: result: yes configure:42790: checking whether DPMSCapable is declared configure:42816: gcc -c -O2 -I/usr/openwin/include -DQT_THREAD_SUPPORT -I/usr /local/include -I/usr/openwin/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D USE_SOLARIS -DSVR4 conftest.c >&5 conftest.c: In function 'main': conftest.c:135: error: 'DPMSCapable' undeclared (first use in this function) conftest.c:135: error: (Each undeclared identifier is reported only once conftest.c:135: error: for each function it appears in.) configure:42822: $? = 1 configure: failed program was: ... configure:42846: result: no configure:42857: checking whether DPMSInfo is declared configure:42883: gcc -c -O2 -I/usr/openwin/include -DQT_THREAD_SUPPORT -I/usr /local/include -I/usr/openwin/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D USE_SOLARIS -DSVR4 conftest.c >&5 conftest.c: In function 'main': conftest.c:135: error: 'DPMSInfo' undeclared (first use in this function) conftest.c:135: error: (Each undeclared identifier is reported only once conftest.c:135: error: for each function it appears in.) configure:42889: $? = 1 configure: failed program was: ... configure:42913: result: no
Comment
#9
David Faure 2006-10-18 12:55:23
On Wednesday 18 October 2006 12:18, Jens Hatlak wrote:
> There are some further defines in X11/extensions/dpmsstr.h (like X_DPMSCapable), but those listed in the error output from the previous comments, like DPMSQueryExtension, are nowhere to be found in /usr/include. > > Unlike koffice, kdebase also checks for DPMSCapable and DPMSInfo:
Hmm, that's weird, the acinclude.m4.in code for AC_HAVE_DPMS is where the checks for DPMSCapable and DPMSInfo come from, so it should be done just the same in koffice and in kdebase. Do you have DPMSSetTimeouts anywhere? What does configure say after "checking for DPMS..."? What's in koffice's config.log about the dpms check?
Comment
#10
Jens Hatlak 2006-10-18 16:22:34
"the acinclude.m4.in code for AC_HAVE_DPMS is where the checks for DPMSCapable and DPMSInfo come from, so it should be done just the same in koffice and in kdebase" Actually, it is the same (same output as in my last comment). I just forgot to check the koffice config.log. DPMSSetTimeouts is not defined anywhere, only X_DPMSSetTimeouts (in X11/extensions/dpmsstr.h). I checked kdebase-3.5.5/kcontrol/energy/energy.cpp and found that it includes the following lines: #ifdef HAVE_DPMS #include <X11/Xmd.h> extern "C" { #include <X11/extensions/dpms.h> Status DPMSInfo ( Display *, CARD16 *, BOOL * ); Bool DPMSCapable( Display * ); int __kde_do_not_unload = 1; #ifndef HAVE_DPMSCAPABLE_PROTO Bool DPMSCapable ( Display * ); #endif #ifndef HAVE_DPMSINFO_PROTO Status DPMSInfo ( Display *, CARD16 *, BOOL * ); #endif } #if defined(XIMStringConversionRetrival) || defined (__sun) || defined(__hpux) extern "C" { #endif Bool DPMSQueryExtension(Display *, int *, int *); Status DPMSEnable(Display *); Status DPMSDisable(Display *); Bool DPMSGetTimeouts(Display *, CARD16 *, CARD16 *, CARD16 *); Bool DPMSSetTimeouts(Display *, CARD16, CARD16, CARD16); #if defined(XIMStringConversionRetrival) || defined (__sun) || defined(__hpux) } #endif #endif Since it compiles here, I guess that's the way to go.
Comment
#11
David Faure 2006-10-18 16:37:33
I see. Does this patch work?
Created an attachment (id=18175)
[details]
KPrView.cpp.diff
Comment
#12
Jens Hatlak 2006-10-18 17:03:16
No, you also have to port #include <X11/Xmd.h> from the kdebase solution. Without it I get the following: KPrView.cpp:222: error: 'CARD16' has not been declared KPrView.cpp:222: error: 'CARD16' has not been declared KPrView.cpp:222: error: 'CARD16' has not been declared KPrView.cpp: In function 'bool isDPMSEnabled()': KPrView.cpp:258: error: 'CARD16' was not declared in this scope KPrView.cpp:258: error: expected `;' before 'x_standby' KPrView.cpp:259: error: expected `;' before 'x_suspend' KPrView.cpp:260: error: expected `;' before 'x_off' KPrView.cpp:264: error: 'x_standby' was not declared in this scope KPrView.cpp:264: error: 'x_suspend' was not declared in this scope KPrView.cpp:264: error: 'x_off' was not declared in this scope CARD16 is defined in X11/Xmd.h -> needs to be included. Otherwise, it compiles now. :-)
Comment
#13
David Faure 2006-10-18 17:19:44
SVN commit 596812 by dfaure: Fix compilation on Solaris - thanks to Jens Hatlak for his tests and feedback BUG: 135830 M +19 -0 KPrView.cpp --- branches/koffice/1.6/koffice/kpresenter/KPrView.cpp #596811:596812 @@ -203,11 +203,30 @@ }; #ifdef HAVE_DPMS +#include <X11/Xlib.h> #include <X11/Xutil.h> +#include <X11/Xmd.h> #include <X11/extensions/dpms.h> #include <fixx11h.h> + +extern "C" { +#ifndef HAVE_DPMSCAPABLE_PROTO +Bool DPMSCapable( Display * ); #endif +} +#if defined(XIMStringConversionRetrival) || defined (__sun) || defined(__hpux) +extern "C" { +#endif + Bool DPMSQueryExtension(Display *, int *, int *); + Status DPMSEnable(Display *); + Status DPMSDisable(Display *); + Bool DPMSGetTimeouts(Display *, CARD16 *, CARD16 *, CARD16 *); +#if defined(XIMStringConversionRetrival) || defined (__sun) || defined(__hpux) +} +#endif +#endif + static void enableDPMS(bool enable) { #ifdef HAVE_DPMS
Comment
#14
Bernd Kuhls 2006-10-18 23:03:44
Patch confirmed working on Solaris 8/Sparc + gcc-3.4.6, thx
P
latform
:
Compiled Sources
O
S
:
Solaris
K
eywords
:
People
Reporter
:
Jens Hatlak
Assigned To
:
David Faure
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
KPrView.cpp.diff
(868 bytes, text/x-diff)
2006-10-18 16:37
,
David Faure
Details
View All
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In