<div dir="ltr"><div class="gmail_default" style="font-size:small">It looks to me like you have an older gfortran that doesn't recognize "-fPIC".</div><div class="gmail_default" style="font-size:small"><br></div>
<div class="gmail_default" style="font-size:small">What does:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"> gfortran --version</div><div class="gmail_default" style="font-size:small">
<br></div><div class="gmail_default" style="font-size:small">report?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You can try removing "-fPIC" from the compile line to see what happens. This is normally the default anyway, so it's not critical that you include it.</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sun, Jul 27, 2014 at 12:41 PM, Giorgio Graffino <span dir="ltr"><<a href="mailto:giorgio.graffino@alice.it" target="_blank">giorgio.graffino@alice.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi Mary, I've typed <br>
<br>
<small>ncargex cpex08 -n gfortran -fPIC -fno-second-underscore
-fno-range-check -fopenmp -O -o cpex08 cpexcc.f cpex08.f
-L/usr/local/ncl-6.2.0/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks
-lncarg_c -lX11 -lXext -lcairo</small><br>
<br>
and then<br>
<br>
<small>ncargex cpex08 -n gfortran -fPIC -fno-second-underscore
-fno-range-check -fopenmp -O -o cpex08 cpexcc.f cpex08.f
-L/usr/local/ncl-6.2.0/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks
-lncarg_c -lX11 -lXext -lcairo -lfontconfig -lpixman-1 -lfreetype
-lexpat -lpng -lz -lXrender -lbz2</small><br>
<br>
but the results is always<br>
<br>
<small>/usr/local/ncl-6.2.0/bin/ncargex : Unknown option
<-fPIC></small><br>
<br>
Where am I wrong?<br>
Giorgio Graffino<br>
<br>
<br>
<div>Il 25/07/2014 22:41, Mary Haley ha
scritto:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><div class="">
<div class="gmail_default" style="font-size:small">Hi Giorgio,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Try compiling
the program without "-liconv" and see what happens. To do
this, first type:</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">ncargex
cpex08 -n</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">
and then copy and paste the full compile line, but without the
-liconv. In fact, I recommend trying it without many of those
last few libraries and see how far you get:</div>
<div class="gmail_default" style="font-size:small">
<br>
</div>
</div><div class=""><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:10.399999618530273px">gfortran
-fPIC -fno-second-underscore -fno-range-check -fopenmp -O -o
cpex08 cpexcc.f cpex08.f -L/usr/local/ncl-6.2.0/lib
-L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11
-lXext -lcairo </span><br style="font-family:arial,sans-serif;font-size:10.399999618530273px">
</div>
<div class="gmail_default"><font face="arial, helvetica,
sans-serif"><br>
</font></div>
</div><div class=""><div class="gmail_default"><font face="arial, helvetica,
sans-serif">At a minimum, you need the "-lcairo" library. If
you find the above statement still gives you undefined
references, then try adding back in the original libraries
in the order they appear.</font></div>
<div class="gmail_default"><font face="arial, helvetica,
sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="arial, helvetica,
sans-serif">--Mary</font></div>
<div class="gmail_default" style="font-size:small">
<span style="font-family:arial,sans-serif;font-size:10.399999618530273px"><br>
</span></div>
<div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:10.399999618530273px"><br>
</span></div>
</div></div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote"><div class="">On Tue, Jul 22, 2014 at 5:34 AM,
Giorgio Graffino <span dir="ltr"><<a href="mailto:giorgio.graffino@alice.it" target="_blank">giorgio.graffino@alice.it</a>></span>
wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div text="#000000" bgcolor="#FFFFFF"> Good morning. <br>
I've downloaded NCL (v6.2.0) from the web page <a href="https://www.earthsystemgrid.org/dataset/ncl.620.html" target="_blank">https://www.earthsystemgrid.org/dataset/ncl.620.html</a>
and i've chosen a Linux OPeNDAP-enabled version, more
exactly the <u>ncl_ncarg-6.2.0.Linux_Debian7.4_x86_64_gcc472.tar.gz</u>
file, according to the guidelines contained in this page <a href="http://www.ncl.ucar.edu/Download/linux.shtml" target="_blank">http://www.ncl.ucar.edu/Download/linux.shtml</a>.
I have an Ubuntu system (v13.10) with gcc v4.8.1. <br>
After the installation, the test <i>ng4ex gsun01n -clean</i>
works well, but the test <i>ncargex cpex08 -clean</i>
gives the following results<br>
<br>
<small>NCAR Graphics Fortran Example <cpex08><br>
<br>
Copying cpex08.f<br>
<br>
Copying cpexcc.f<br>
<br>
Compiling and linking...<br>
gfortran -fPIC -fno-second-underscore -fno-range-check
-fopenmp -O -o cpex08 cpexcc.f cpex08.f
-L/usr/local/ncl-6.2.0/lib -L/usr/X11R6/lib64 -lncarg
-lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lfontconfig
-lpixman-1 -lfreetype -lexpat -lpng -lz -liconv
-lXrender -lbz2<br>
/usr/bin/ld: impossibile trovare -liconv<br>
collect2: error: ld returned 1 exit status<br>
<br>
The compile and link failed.</small><br>
<br>
where "impossibile trovare" means "cannot find". <br>
Unfortunately, I must have NCAR Graphics working on my
system... I've already installed the libraries suggest in
<a href="http://www.ncl.ucar.edu/Download/linux.shtml" target="_blank">http://www.ncl.ucar.edu/Download/linux.shtml</a>
and also iconv (v2.17), as suggested in <a href="http://www.ncl.ucar.edu/Support/install_archives/2014/0141.html" target="_blank">http://www.ncl.ucar.edu/Support/install_archives/2014/0141.html</a>.
I failed when I tried to compile the <i>CPEX08 </i>program
without<i> -liconv</i> and to modify any "ncarg" file by
myself. Any other suggestions?<br>
Thanks a lot. <br>
<span><font color="#888888"> Giorgio
Graffino<br>
<br>
<br>
</font></span></div>
<br></div></div><div class="">
_______________________________________________<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>
</div></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</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>