<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If I may jump in here: Sometimes when I have problems building "cro.c", I try this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style><ul style><li style>cd to the directory that contains the "cro.c" file, which should be" $NCARG/ncarg2d/src/libncarg_gks/cdrivers</li><li style>Edit the "Makefile" with a UNIX editor and remove all references to "-ansi".</li><li style>After you save the file, type "make cro.o" in the same directory and see if there are any errors.</li><li style>If not, then type "make me" in the same directory to remake that Makefile, and then cd back to $NCARG to start the build up again:</li><ul><li style>make all install</li></ul></ul><div><br></div><div>Be sure to send the "make all install" output to a file, if you desire. Once "cro.o" builds successfully, this should cause "libncarg_gks.a" to build successfully, and hence the "undefined _ggkwdr_" errors should disappear.</div><div><br></div><div>--Mary</div><div><br></div><div><br></div></div><div class="gmail_default" style="font-size:small">=</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 10:26 AM, 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><div><div><div>Hi Dave,<br><br></div>On the issue of M_PI, on my linux machine, it resides in math.h and would be gcc's. Its guarded by preprocessor conditionals:<br><br>#if defined __USE_BSD || defined __USE_XOPEN<br>....<br># define M_PI 3.14159265358979323846 /* pi */<br>....<br></div>#endif<br><br></div>As Dave Brown's reply indicated, there's probably some compiler option that will enable it.<br><br></div>As for the link errors -- I really don't know what to suggest. I have zero experience with ifort. The undefined symbol "_ggkwdr_" is a bit of C--code coming out of libncarg_gks. <br><br></div>Wish I could be of more help...<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Rick<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 16, 2014 at 11:43 AM, Dave Lane <span dir="ltr"><<a href="mailto:dlane@ap.stmarys.ca" target="_blank">dlane@ap.stmarys.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi Rick,<br>
<br>
What would the appropriate definition of M_PI be? <br>
<br>
Also note that I'm compiling with V4.9 of gcc and ifort. The same
file must have compiled ok when I built with gcc/gfortran (both
4.9). <br>
<br>
Examples of other errors are:<br>
<br>
gcc-mp-4.9 -bind_at_load -r -o libconrcqck.o conrec.o clgen.o
quick.o maxmin.o calcnt.o ezcntr.o conbd.o<br>
ld: warning: unexpected dylib (/usr/lib/libSystem.dylib) on link
line<br>
ld: warning: unexpected dylib
(/opt/local/lib/gcc49/libgcc_ext.10.5.dylib) on link line<br>
0 0x1049c2abb __assert_rtn + 144<br>
1 0x1049eb2c6
ld::tool::SectionRelocationsAtom<x86>::sectSymNum(bool,
ld::Atom const*) + 0<br>
2 0x1049d9180
ld::tool::SectionRelocationsAtom<x86_64>::encodeSectionReloc(ld::Internal::FinalSection*,
ld::tool::SectionRelocationsAtom<x86_64>::Entry const&,
std::__1::vector<macho_relocation_info<Pointer64<LittleEndian>
>,
std::__1::allocator<macho_relocation_info<Pointer64<LittleEndian>
> > >&) + 86<br>
3 0x104a0e7b8
ld::tool::SectionRelocationsAtom<x86_64>::encode() + 62<br>
4 0x1049e04ca
ld::tool::OutputFile::updateLINKEDITAddresses(ld::Internal&) +
454<br>
5 0x1049db0de ld::tool::OutputFile::write(ld::Internal&) + 138<br>
6 0x1049c37f0 main + 1012<br>
7 0x7fff8ebf55fd start + 1<br>
A linker snapshot was created at:<br>
/tmp/libconrcqck.o-2014-08-15-141432.ld-snapshot<br>
ld: Assertion failed: (_machoSection != 0), function machoSection,
file src/ld/ld.hpp, line 714.<br>
collect2: error: ld returned 1 exit status<br>
make[5]: *** [libconrcqck.o] Error 1<br>
<br>
----- and ------<br>
<br>
ifort -m64 -openmp -O -o tdpackdemo TdpackDemo.o
-L../../../.././ncarg2d/src/libncarg -lncarg
-L../../../.././ncarg2d/src/libncarg_gks -lncarg_gks
-L../../../.././common/src/libncarg_c -lncarg_c -lcairo -lfontconfig
-lpixman-1 -lfreetype -lexpat -lpng -lz -lpthread -lbz2 -lXrender
-lpng -lz -L/usr/local/ncarg/ifort/lib
-L/opt/intel/composer_xe_2011_sp1.10.328/compiler/lib -L/opt/X11/lib
-L/opt/local/lib -L/opt/local/hdf4/ifort/lib
-L/opt/local/szip/ifort/lib -lXpm -lX11 -lXext<br>
Undefined symbols for architecture x86_64:<br>
"_ggkwdr_", referenced from:<br>
_gztowk_ in libncarg_gks.a(gztowk.o)<br>
_gziqwk_ in libncarg_gks.a(gziqwk.o)<br>
ld: symbol(s) not found for architecture x86_64<br>
make[5]: *** [tdpackdemo] Error 1<span><font color="#888888"><br>
<br>
--- Dave<br>
</font></span><br>
ps. And I have compiled ncarg successfully on a mac with ifort/gcc
a few years ago with maybe 10.6.<div><div><br>
<br>
<div>On 15/09/2014 11:22 PM, Rick Brownrigg
wrote:<br>
</div>
<blockquote type="cite">
<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<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>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></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>