Re: problem compiling the NCAR graphics ubuntu 10.04 with gcc/gfortran 4.4.3

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 04 2011 - 10:54:23 MST

Hi Saulo,

We just released NCL V6.0.0-beta, and I think we got rid of most of the gfortran_xxxx undefined issues.

We have LINUX x86_64 binaries that were compiled with gcc 4.3.2 and gcc 4.4.5. You might try one of these and see if the problem goes away.

The 6.0.0-beta version is on the ESG:

http://www.earthsystemgrid.org

Click on "NCL: NCAR Command Language" and then "NCL Version 6.0.0-beta".

Decide whether you want OPeNDAP-enabled or non-OPeNDAP enabled binaries and click on the corresponding link.

The OPeNDAP files of interest are:

ncl_ncarg-6.0.0-beta.Linux_Debian_x86_64_gcc432.tar.gz

ncl_ncarg-6.0.0-beta.Linux_Debian_x86_64_gcc445.tar.gz

Or, if you want non-OPeNDAP enabled:

ncl_ncarg-6.0.0-beta.Linux_Debian_x86_64_nodap_gcc432.tar.gz

ncl_ncarg-6.0.0-beta.Linux_Debian_x86_64_nodap_gcc445.tar.gz

--Mary

On Mar 3, 2011, at 1:47 PM, Saulo Soares wrote:

> Hi NCL list,
>
> I have a problem compiling the NCAR graphics.
> I downloaded the binary for 64 bit machine running ubuntu:
> ncl_ncarg-5.2.1.Linux_Debian_x86_64_gcc412.tar.gz
>
> However my gcc/gfortran version is 4.4.3, much newer, so when I run:
> $ ncargex cpex08 -clean
> NCAR Graphics Fortran Example <cpex08>
>
> Copying cpex08.f
>
> Copying cpexcc.f
>
> Compiling and linking...
> gfortran -fPIC -fno-second-underscore -fno-range-check -O -o cpex08 cpexcc.f cpex08.f -L/home/saulo/NCL/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lgfortran
>
> I get a bunch of this error:
>
> /home/saulo/NCL/lib/libncarg.a(mdgetc.o): In function `mdgetc_':
> mdgetc.f:(.text+0x8d): undefined reference to `_gfortran_copy_string'
>
> I google solutions to this from the ncl list and it was suggested that getting libgfortran.so.1 and linking it to gcc/lib/libgfortran.so could do the trick.
> I did that but now the compiler complains about a reference that is in the newer gcc/gfortran version:
>
> /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
> (.text+0x20): undefined reference to `main'
> /tmp/ccM2T3gF.o: In function `MAIN__':
> cpex08.f:(.text+0x4d5): undefined reference to `_gfortran_set_options'
> collect2: ld returned 1 exit status
>
> The compile and link failed.
>
> Does anyone knows a solution to this? Or do I have to compile from source?
> Or is it possible to make the gcc symbolic link /usr/lib/gcc/x86_64-linux-gnu/4.4/libgfortran.so point to 2 different libraries (link to both libgfortran.so.1 and libgfortran.so.3) at the same time?
>
> Thanks!!
> Aloha
> Saulo Soares
> Phd candidate
> Dept Oceanography
> University of Hawaii at Manoa
> _______________________________________________
> 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
Received on Fri Mar 4 10:54:27 2011

This archive was generated by hypermail 2.1.8 : Thu Mar 10 2011 - 21:49:15 MST