[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 980310: netcdf vs. egcs



Kate,

> To: address@hidden
> From: Kate Hedstrom <address@hidden>
> Subject: netcdf vs. egcs
> Organization: Rutgers University
> Keywords: 199803101832.LAA14303

In the above message, you wrote:

> I just tried to compile netCDF version 3.4 with the new version of
> the egcs compiler, consisting of gcc, g++, and g77.  It was doing
> fine through the C and C++ part, but nf_test failed to link.  It
> seems that g77 has a different convention on underscores than Sun
> f77:
> 
> ahab% more noot.f
>       subroutine nf_nothing
>       end
> 
>       subroutine nfnothing
>       end
> ahab% g77 -c noot.f
> ahab% nm noot.o
> 
> 
> noot.o:
> 
> [Index]   Value      Size    Type  Bind  Other Shndx   Name
> 
> [3]     |         0|       0|SECT |LOCL |0    |2      |
> [2]     |         0|       0|NOTY |LOCL |0    |2      |gcc2_compiled.
> [5]     |         0|      20|FUNC |GLOB |0    |2      |nf_nothing__
> [4]     |        20|      20|FUNC |GLOB |0    |2      |nfnothing_
> [1]     |         0|       0|FILE |LOCL |0    |ABS    |noot.f
> ahab% f77 -c noot.f
> noot.f:
>         nf_nothing:
>         nfnothing:
> ahab% nm noot.o
> 
> 
> noot.o:
> 
> [Index]   Value      Size    Type  Bind  Other Shndx   Name
> 
> [3]     |        16|      12|FUNC |GLOB |0    |2      |nf_nothing_
> [2]     |        48|      12|FUNC |GLOB |0    |2      |nfnothing_
> [1]     |         0|       0|FILE |LOCL |0    |ABS    |noot.f
> 
> 
> Anyway, the link fails because the fortran side is looking for
> things like nf_open__ while the C side is providing nf_open_.
> THis is not critical for me because I use the egcs netcdf libraries
> for C++, not Fortran, but thought you might be interested in knowing
> about this problem.
> 
> Kate
> - --
> Kate Hedstrom               Institute of Marine and Coastal Sciences
> address@hidden       Rutgers University

Thanks for the report.  Unfortunately, we don't have a working g77 here
so I can't duplicate the problem.  This is why we recommend using
fort77(1) in the INSTALL file instead of g77.  We're working on getting 
g77(1) to work, however, so that compiler should be supported soon.

--------
Steve Emmerson   <http://www.unidata.ucar.edu>