info-inventor-dev
[Top] [All Lists]

Re: patches

To: Jonathan Lim <jlim@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: patches
From: Ralf Corsepius <corsepiu@xxxxxxxxxxxxxx>
Date: Wed, 20 Sep 2000 15:09:47 +0200
Cc: info-inventor-dev@xxxxxxxxxxx
Organization: Ralf Corsepius
References: <200009201220.FAA90150@xxxxxxxxxxxxxxxxxxxx>
Reply-to: corsepiu@xxxxxxxxxxxxxx
Sender: owner-info-inventor-dev@xxxxxxxxxxx
Jonathan Lim wrote:
> 
> On Wed Sep 20 03:10:18 2000, corsepiu@xxxxxxxxxxxxxx wrote:
> >
> > Hi,
> >
> > I've just built ovi from CVS on a SuSE-7.0 system (gcc-2.95.2,
> > lesstif-0.89, XFree-4.0.1).
> >
> > Though this didn't work "right out of the box" and required me to
> > apply a couple of modifications, things now basically seem to work.
> >
> > Most of these modifications are adaptations to SuSE's gcc-2.95.2,
> > which seems to be stricter on c++-pecularities (variable scoping,
> > const casting etc.) than other c++ compilers.
> >
> > In case you're interested, I could send these patches to this list.
> >
> > Regards
> >       Ralf
> 
> Is the compiler returning errors or warnings?

Unfortunately errors (SuSE's gcc-2.95.2 is not identical to the
original gcc-2.95.2, AFAIK it actually is gcc-2.95.3 + SuSE-specific
patches).

Example:

A variable scoping related error (include paths are modified to
reflect my local setup):

apps/demos/noodle # /usr/bin/g++        -DPOSIX_SOURCE
-D_XOPEN_SOURCE -I/usr/X11R6/LessTif/Motif1.2/include
-I/usr/X11R6/include -I. -I../../../lib/database/include
-I../../../lib/interaction/include -I../../../lib/nodekits/include
-I../../../libSoXt/include -I../../nodes/GeneralizedCylinder -fPIC
-DNDEBUG   -c WorldInfo.c++
WorldInfo.c++: In method `void WorldInfo::setFileName(char *)':
WorldInfo.c++:219: implicit declaration of function `int
strdup(...)'
WorldInfo.c++:219: assignment to `char *' from `int' lacks a cast
WorldInfo.c++: In method `void
WorldInfo::deleteNoodle(GeneralizedCylinder *)':
WorldInfo.c++:276: name lookup of `objInd' changed for new ANSI
`for' scoping
WorldInfo.c++:268:   using obsolete binding at `objInd'


Adding -D_XOPEN_SOURCE_EXTENDED to get strdup() from glibc, because
it declares strdup conditionally (glibc-2.1.3-153, SuSE-rpm)

apps/demos/noodle # /usr/bin/g++        -DPOSIX_SOURCE
-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
-I/usr/X11R6/LessTif/Motif1.2/include -I/usr/X11R6/include -I.
-I../../../lib/database/include -I../../../lib/interaction/include
-I../../../lib/nodekits/include -I../../../libSoXt/include
-I../../nodes/GeneralizedCylinder -fPIC -DNDEBUG   -c WorldInfo.c++
WorldInfo.c++: In method `void
WorldInfo::deleteNoodle(GeneralizedCylinder *)':
WorldInfo.c++:276: name lookup of `objInd' changed for new ANSI
`for' scoping
WorldInfo.c++:268:   using obsolete binding at `objInd'

Now adding -fno-for-scope:
apps/demos/noodle # /usr/bin/g++  -fno-for-scope      -DPOSIX_SOURCE
-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
-I/usr/X11R6/LessTif/Motif1.2/include -I/usr/X11R6/include -I.
-I../../../lib/database/include -I../../../lib/interaction/include
-I../../../lib/nodekits/include -I../../../libSoXt/include
-I../../nodes/GeneralizedCylinder -fPIC -DNDEBUG   -c WorldInfo.c++

> Some of the problems can be avoided by using the right options,
Of cause (cf. above), but ... I prefer fixing the cause instead of
playing with compiler options.

> which is preferable to making changes in a
> whole lot of source files.

Understandable :)

FYI: I also had to adapt several rpm and installation path related
portions, because SuSE uses different paths than RH (eg.
/usr/share/man instead of /usr/man,
/usr/share/doc/packages/<package> instead of /usr/doc/<package>,
/usr/src/packages instead of /usr/src/redhat).

Ralf
-- 
Ralf Corsepius 
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:corsepiu@xxxxxxxxxxxxxx           FAX: +49/731/501-999  
http://www.faw.uni-ulm.de

<Prev in Thread] Current Thread [Next in Thread>