[ncl-install] Cannot find -liconv

Giorgio Graffino giorgio.graffino at alice.it
Tue Aug 5 09:15:21 MDT 2014


Hi Mary. The command line
gfortran --version
reports
GNU Fortran (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
and I think it's the latest version available.
I typed
ncargex cpex08 -n gfortran -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
and the result is
/usr/local/ncl-6.2.0/bin/ncargex : Unknown option <-fno-second-underscore>
so I tried
ncargex cpex08 -n gfortran -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
and the result is
/usr/local/ncl-6.2.0/bin/ncargex : Unknown option <-fno-range-check>
and so on.
I'm thinking that I made some mistake when I've installed the software, 
even if the /ng4ex /test works well... If necessary, how can I 
completely re-install the software?
Thanks a lot.
Giorgio Graffino
Il 29/07/2014 05:48, Mary Haley ha scritto:
> It looks to me like you have an older gfortran that doesn't recognize 
> "-fPIC".
>
> What does:
>
>   gfortran --version
>
> report?
>
> 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.
>
> --Mary
>
>
>
> On Sun, Jul 27, 2014 at 12:41 PM, Giorgio Graffino 
> <giorgio.graffino at alice.it <mailto:giorgio.graffino at alice.it>> wrote:
>
>     Hi Mary, I've typed
>
>     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
>
>     and then
>
>     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
>
>     but the results is always
>
>     /usr/local/ncl-6.2.0/bin/ncargex : Unknown option <-fPIC>
>
>     Where am I wrong?
>     Giorgio Graffino
>
>
>     Il 25/07/2014 22:41, Mary Haley ha scritto:
>>     Hi Giorgio,
>>
>>     Try compiling the program without "-liconv" and see what happens.
>>      To do this, first type:
>>
>>     ncargex cpex08 -n
>>
>>     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:
>>
>>     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
>>
>>     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.
>>
>>     --Mary
>>
>>
>>
>>
>>     On Tue, Jul 22, 2014 at 5:34 AM, Giorgio Graffino
>>     <giorgio.graffino at alice.it <mailto:giorgio.graffino at alice.it>> wrote:
>>
>>         Good morning.
>>         I've downloaded NCL (v6.2.0) from the web page
>>         https://www.earthsystemgrid.org/dataset/ncl.620.html and i've
>>         chosen a Linux OPeNDAP-enabled version, more exactly the
>>         _ncl_ncarg-6.2.0.Linux_Debian7.4_x86_64_gcc472.tar.gz_ file,
>>         according to the guidelines contained in this page
>>         http://www.ncl.ucar.edu/Download/linux.shtml. I have an
>>         Ubuntu system (v13.10) with gcc v4.8.1.
>>         After the installation, the test /ng4ex gsun01n -clean/ works
>>         well, but the test /ncargex cpex08 -clean/ gives the
>>         following results
>>
>>         NCAR Graphics Fortran  Example <cpex08>
>>
>>           Copying cpex08.f
>>
>>           Copying cpexcc.f
>>
>>         Compiling and linking...
>>         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
>>         /usr/bin/ld: impossibile trovare -liconv
>>         collect2: error: ld returned 1 exit status
>>
>>         The compile and link failed.
>>
>>         where "impossibile trovare" means "cannot find".
>>         Unfortunately, I must have NCAR Graphics working on my
>>         system... I've already installed the libraries suggest in
>>         http://www.ncl.ucar.edu/Download/linux.shtml and also iconv
>>         (v2.17), as suggested in
>>         http://www.ncl.ucar.edu/Support/install_archives/2014/0141.html.
>>         I failed when I tried to compile the /CPEX08 /program
>>         without/-liconv/ and to modify any "ncarg" file by myself.
>>         Any other suggestions?
>>         Thanks a lot.
>>         Giorgio Graffino
>>
>>
>>
>>         _______________________________________________
>>         ncl-install mailing list
>>         List instructions, subscriber options, unsubscribe:
>>         http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>
>>
>
>
>     _______________________________________________
>     ncl-install mailing list
>     List instructions, subscriber options, unsubscribe:
>     http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20140805/efcda740/attachment.html 


More information about the ncl-install mailing list