[GRASS5] r.flow: strange compile error M_PI
Daniel Calvelo Aros
dcalvelo at minag.gob.pe
Thu Jun 23 12:53:28 EDT 2005
From: Markus Neteler <neteler at itc.it>
Sent: Thu, 23 Jun 2005 04:25:54 +0200
>
> On Wed, Jun 22, 2005 at 07:04:55PM -0700, Brad Douglas wrote:
> > On Thu, 2005-06-23 at 00:12 +0200, Markus Neteler wrote:
> > > Hi,
> > >
> > > after an update of the Linux OS, I am no longer able to
> > > compile r.flow:
> > >
> > > thuille:r.flow[281.25] make
> > > gcc -I/hardmnt/thuille0/ssi/software/cvsgrass61/include
-I/hardmnt/thuille0/ssi/software/cvsgrass61/dist.i686-pc-linux-gnu/include/grass
-g -Wall -ansi -Wall -Wconversion -Wno-implicit-int -I/usr/local/include
-DPACKAGE=\""grassmods"\"
-I/hardmnt/thuille0/ssi/software/cvsgrass61/include
-I/hardmnt/thuille0/ssi/software/cvsgrass61/dist.i686-pc-linux-gnu/include/grass \
> > > -o OBJ.i686-pc-linux-gnu/aspect.o -c aspect.c
> > > aspect.c: In function `aspect_fly':
> > > aspect.c:50: error: `M_PI' undeclared (first use in this function)
> > > aspect.c:50: error: (Each undeclared identifier is reported only once
> > > aspect.c:50: error: for each function it appears in.)
> > > make: *** [OBJ.i686-pc-linux-gnu/aspect.o] Error 1
>
> Sorry, forgot to post that. Yes, it is defined:
>
> grep M_PI /usr/include/math.h
> # define M_PI 3.14159265358979323846 /* pi */
> # define M_PI_2 1.57079632679489661923 /* pi/2 */
> # define M_PI_4 0.78539816339744830962 /* pi/4 */
> # define M_PIl 3.1415926535897932384626433832795029L /* pi */
> # define M_PI_2l 1.5707963267948966192313216916397514L /* pi/2 */
> # define M_PI_4l 0.7853981633974483096156608458198757L /* pi/4 */
Try to launch a "gcc -E apect.c" (with the appropriate -I's) and grep for M_PI
in the resulting file. That will tell if it ends up being visible. Now, I
wonder wether "#define" and "# define" are the same...
Daniel.
More information about the grass-dev
mailing list