<div dir="ltr">I don't think M_PI is simply a GNU-ism. With the right macros it is part of the C library math.h. According to the GNU C Library document:<br><br>These constants come from the Unix98 standard and were also available in 4.4BSD; therefore they are only defined if _XOPEN_SOURCE=500, or a more general feature select macro, is defined.<br><br>M_PI is one of "these constants". There is certainly evidence on the internet that with the right flags the Intel compiler can recognize M_PI, e.g.:<div><a href="https://software.intel.com/en-us/forums/topic/265759">https://software.intel.com/en-us/forums/topic/265759</a><br></div><div><br></div><div> -dave</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 8:22 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Dave,<br><br></div>I'm not totally sure about this one, but it appears M_PI *may* be a GNU-ism -- a non-standard constant specific to the gcc compiler. I'll investigate this further, but if that's the case, we clearly should not rely on such a compiler-specific idiom. In the mean time, you could patch your copy of cro.c with the appropriate definition in order to move forward. <br><br></div>You say there are many errors -- are they beyond just this particular symbol being undefined?<br><br></div>Rick<br><div><div><br><div><div><br><br>Message: 1<br>
Date: Mon, 15 Sep 2014 15:56:26 -0300<br>
From: Dave Lane <<a href="mailto:dlane@ap.stmarys.ca" target="_blank">dlane@ap.stmarys.ca</a>><br>
Subject: [ncl-install] Installing ncarg on OS X 10.9 with ifort<br>
To: <a href="mailto:ncl-install@ucar.edu" target="_blank">ncl-install@ucar.edu</a><br>
Message-ID: <<a href="mailto:5417365A.5010200@ap.stmarys.ca" target="_blank">5417365A.5010200@ap.stmarys.ca</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<span class=""><br>
<br>
Hi,<br>
<br>
I am having troubles building NCAR Graphics (6.2.0) on OS 10.9 with<br>
ifort (V13.0.2).<br>
<br>
First of all, with the same machine I have successfully compiled it with<br>
gfortran (both library versions are needed by the researcher).<br>
<br>
The first error (there are many) is:<br>
<br>
gcc-mp-4.9 -ansi -m64 -fopenmp -lsz -O -I../../../.././include<br>
-I/opt/intel/composer_xe_2011_sp1.10.328/compiler/include<br>
-I/opt/X11/include -I/opt/local/include -I/opt/X11/include/freetype2<br>
-I/opt/local/hdf4/ifort/include -I/opt/local/szip/ifort/include<br>
-DDarwin -DCTXT -DX11 -DPS -DPDF -DPIX -DSYSV -D_POSIX_SOURCE<br>
-D_XOPEN_SOURCE -DByteSwapped -D__UNIXOS2__ -DNeedFuncProto -c -o<br>
cro.o cro.c<br>
cro.c: In function 'cro_Polymarker':<br>
cro.c:1451:71: error: 'M_PI' undeclared (first use in this function)<br>
cairo_arc(context, xc, yc, mscale * marker_size, 0., 2. *<br>
M_PI);<br>
^<br>
cro.c:1451:71: note: each undeclared identifier is reported only once<br>
for each function it appears in<br>
make[5]: *** [cro.o] Error 1<br>
<br>
The cro.c file is this one: ./ncarg2d/src/libncarg_gks/cdrivers/cro.c<br>
<br>
Any idea where MP_I is supposed to be defined?<br>
<br>
--- Dave<br>
<br>
</span></div></div></div></div></div>
<br>_______________________________________________<br>
ncl-install mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-install</a><br>
<br></blockquote></div><br></div>