[ncl-install] Cannot find -liconv

Mary Haley haley at ucar.edu
Mon Jul 28 21:48:11 MDT 2014


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> 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> 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/20140728/1632553e/attachment.html 


More information about the ncl-install mailing list