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

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

On Tue, May 15, 2001 at 10:46:51AM +0200, Stephan Kulow wrote:
> On Tuesday 15 May 2001 01:46, Rob Napier wrote:
> > On Wed, May 09, 2001 at 12:08:28PM +0200, Stephan Kulow wrote:
> > > > 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?
> > >
> > > You mean like people not using gcc?
> >
> > Is -isystem gcc specific? I seem to be in a minefield here, and I
> > can't figure out what changed. for instance, here's today's latest
> > problem:
> >
> > g++ -DHAVE_CONFIG_H -I. -I. -I.. -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/ksocks.pp -c ksocks.cpp  -fPIC -DPIC -o .libs/ksocks.o
> > ksocks.cpp: In method `int KSocks::connect(int, const sockaddr *, unsigned
> > int)': ksocks.cpp:432: passing `const sockaddr *' as argument 2 of
> > `connect(int, sockaddr *, int)' discards qualifiers ksocks.cpp: In method
> > `int KSocks::recvfrom(int, void *, long unsigned int, int, sockaddr *,
> > ksocklen_t *)': ksocks.cpp:456: ANSI C++ forbids implicit conversion from
> > `void *' in argument passing ksocks.cpp: In method `int KSocks::sendto(int,
> > const void *, long unsigned int, int, const sockaddr *, unsigned int)':
> > ksocks.cpp:467: ANSI C++ forbids implicit conversion from `void *' in
> > argument passing ksocks.cpp: In method `int KSocks::recv(int, void *, long
> > unsigned int, int)': ksocks.cpp:474: ANSI C++ forbids implicit conversion
> > from `void *' in argument passing ksocks.cpp: In method `int
> > KSocks::send(int, const void *, long unsigned int, int)': ksocks.cpp:481:
> > ANSI C++ forbids implicit conversion from `void *' in argument passing
> > make[1]: *** [ksocks.lo] Error 1
> > make[1]: Leaving directory `/users/rnapier/kde-cvs/kdelibs/kdecore'
> > make: *** [all-recursive] Error 1
> >
> >
> > I've also tried it with -isystem /usr/openwin/include to no avail. A
> > couple of weeks ago, I got these warnings, but they weren't errors. I
> > can't find a -Werror or -pedantic-errors anywhere. This warning->error
> > translation was why I went down the road of using -isystem.
> >
> > The only thing that seems to fix this is to put in -fpermissive. Did
> > that use to be in there and get removed? Is there something less
> > drastic that could fix this?
> >
> We used to use -pedantic, which gives you a lot of warnings. Now we don't use 
> it anymore, so you now get _some_ errors. -fpermissive has been added for 
> Solaris, so I wouldn't mind adding it there :)
> But -pedantic would help _you_ too.

Not sure I understand here. I'm running solaris (2.6). Do you mean
-fpermissive was just added?

I'm thrilled to get more warning-free code, but I'm not sure how we
want to go about it. The common problem is that Linux uses void* for
things Solaris uses char* for. Similarly, there's a lot of
signed/unsigned problems floating around. I remember the nightmare of
getting size_t/socklen_t finally all working. Do we have the stomach
for more of that? Do we have a "normal" way of going about fixing it?
I'm happy to start sending examples.

Here's my biggest one currently:

/usr/openwin/include/X11/Xutil.h:363: ANSI C++ forbids declaration `XClipBox' with no type

I get dozens of these whenever Xutil.h is included. Changing '-I
/usr/openwin/include' to '-isystem /usr/openwin/include' fixes it, but
often breaks other things that use $(INCLUDES) like mcopidl. I don't
deeply understand what -isystem does, unfortunately. The gcc info
section on it is extremely vague.

Rob
 
>> 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