[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [PATCH] Re: Weird kdelibs/kfile compile problem
From:       Rob Napier <rnapier () employees ! org>
Date:       2001-05-08 16:52:42
[Download RAW message or body]

On Thu, May 03, 2001 at 11:28:46PM -0400, Rob Napier wrote:
> On Thu, May 03, 2001 at 04:36:07PM -0500, kde-devel@thewrittenword.com wrote:
> > On Thu, May 03, 2001 at 01:56:56PM -0400, Rob Napier wrote:
> > > On Thu, May 03, 2001 at 12:08:19PM +0200, Stephan Kulow wrote:
> > > > On Wednesday, 2. May 2001 19:01, Rob Napier wrote:
> > > > > When compiling kdeibs/kfile from CVS today, I'm getting this problem
> > > > > on Solaris:
> > > > >
> > > > > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I./../libltdl/ -I../kio -I../kio
> > > > > -I../dcop -I../libltdl -I../kdecore -I../kdeui -I../kssl
> > > > > -I/users/rnapier/qt2/include -I/usr/openwin/include
> > > > > -I/users/rnapier/kde2/include -I/usr/local/include
> > > > > -I/usr/local/contrib/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
> > > > > -DUSE_SOLARIS -O2 -fno-exceptions -fno-check-new -frtti -ftemplate-depth-99
> > > > > -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST
> > > > > -Wp,-MD,.deps/kpropsdlg.pp -c kpropsdlg.cpp  -fPIC -DPIC o
> > > > > .libs/kpropsdlg.o
> > > > > In file included from kpropsdlg.cpp:94:
> > > > > /usr/openwin/include/X11/Xlib.h:2063: ANSI C++ forbids declaration
> > > > > `XSetTransientForHint' with no type /usr/openwin/include/X11/Xlib.h:2071:
> > > > > ANSI C++ forbids declaration `XActivateScreenSaver' with no type [...]
> > > > > /usr/openwin/include/X11/Xlib.h:4141: ANSI C++ forbids declaration
> > > > > `XWarpPointer' with no type /usr/openwin/include/X11/Xlib.h:4162: ANSI C++
> > > > > forbids declaration `XWindowEvent' with no type make[1]: *** [kpropsdlg.lo]
> > > > > Error 1
> > > > > make[1]: Leaving directory `/users/rnapier/kde-cvs/kdelibs/kfile'
> > > > >
> > > > >
> > > > > The warnings themselves shoudln't be the problem. I get them all the
> > > > > time. The problem is stuff like this in Xlib.h:
> > > > >
> > > > > extern XSetTransientForHint(
> > > > > #if NeedFunctionPrototypes
> > > > >     Display*            /* display */,
> > > > >     Window              /* w */,
> > > > >     Window              /* prop_window */
> > > > > #endif
> > > > > );
> > > > >
> > > > > Notice that there's no type set for XSetTransientForHint. There's a
> > > > > ton of these, and I have no idea how to get rid of this warning, but
> > > > What I did is adding 'int's in Xlib.h :)
> > > 
> > > > I somehow think the error is in the part you named [...]
> > > 
> > > Lubos found the "fix," which is adding -fpermissive, but this seems
> > > dangerous (and I don't understand what changed to require it, or where
> > > to put it). I've attached the full make output from this file. As
> > > you'll see, the part I elided is identical to the sample. I am also
> > > now seeing this problem on other files that include Xlib.h. I was
> > > building fine a few days ago on this machine.
> > 
> > No. That is the wrong fix. Use '-isystem /usr/openwin/include'.
> > -fpermissive is very wrong.
> 
> Huh. I have to make this same hack all the time to get QT to compile.
> OK, so can we do the same thing on other languages, or is this
> something we'll need to configure check for Solaris? What the heck is
> -isystem anyway? Haven't tried compiling this way yet.

The below patch seems to make Solaris happy (there are other compiling
problems right now). I wouldn't think it would cause trouble for
anyone else. Does it?

Index: admin/acinclude.m4.in
===================================================================
RCS file: /home/projects/kdecvs/cvsroot/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.98
diff -u -3 -p -r2.98 acinclude.m4.in
--- admin/acinclude.m4.in	2001/05/02 17:42:02	2.98
+++ admin/acinclude.m4.in	2001/05/08 16:51:31
@@ -589,7 +589,7 @@ if test -z "$kde_x_includes" || test "x$
   x_includes="."; dnl better than nothing :-
  else
   x_includes=$kde_x_includes
-  X_INCLUDES="-I$x_includes"
+  X_INCLUDES="-isystem $x_includes"
 fi
 
 if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic