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

[netCDF #YQG-383700]: Fortran name mangling does not agree with F90 mangling



Hi Jed,

Sorry it's taken so long to respond to your question.

> On Wed, 27 Jan 2010 15:52:41 -0700, "Unidata netCDF Support" <address@hidden> 
> wrote:
> > Gfortran changed the way that it mangles names. I don't remember the 
> > version.
> >
> > This is controlled by setting a pre-processor flag. For gfortran, try 
> > -Dgfortran.

I think this should have been 

  CPPFLAGS=-DgFortran

Note the capitalized "F", which is significant.  Sorry that we got this wrong.

> >
> > Set this in CPPFLAGS, then reconfigure and rebuild netcdf. Do a make check 
> > to see if the fortran APIs are working.
> 
> This does not work, make check fails at
> 
> libtool: link: mpif77 -I../fortran -I/usr/include -I/usr/include -I../libsrc4 
> -I../f90 -Dgfortran -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--hash-style=gnu 
> -Wl,--as-needed -o .libs/nf_test test_get.o test_put.o nf_error.o nf_test.o 
> test_read.o test_write.o util.o fortlib.o  -L/lib -L/usr/lib 
> ../fortran/.libs/libnetcdff.so 
> /home/jed/build/arch/netcdf-hdf5/src/netcdf-4.1.1/libsrc4/.libs/libnetcdf.so 
> /usr/lib/openmpi/libmpi.so /usr/lib/openmpi/libopen-rte.so 
> /usr/lib/openmpi/libopen-pal.so -ldl -lnsl -lutil -lm 
> ../libsrc4/.libs/libnetcdf.so -lcurl -lhdf5_hl -lhdf5 -lz -pthread
> test_get.o: In function `test_nf_get_var1_text_':
> test_get.F:(.text+0x2c): undefined reference to `nf_open_'
> test_get.F:(.text+0xfe): undefined reference to `nf_get_var1_text_'
> test_get.F:(.text+0x148): undefined reference to `nf_get_var1_text_'
> test_get.F:(.text+0x1f6): undefined reference to `nf_get_var1_text_'
> test_get.F:(.text+0x389): undefined reference to `nf_get_var1_text_'
> test_get.F:(.text+0x54b): undefined reference to `nf_close_'
> test_get.o: In function `test_nf_get_var1_int1_':
> test_get.F:(.text+0x5b8): undefined reference to `nf_open_'
> test_get.F:(.text+0x684): undefined reference to `nf_get_var1_int1_'
> test_get.F:(.text+0x6c8): undefined reference to `nf_get_var1_int1_'
> test_get.F:(.text+0x770): undefined reference to `nf_get_var1_int1_'
> test_get.F:(.text+0x8fd): undefined reference to `nf_get_var1_int1_'
> test_get.F:(.text+0xabf): undefined reference to `nf_close_'
> 
> [...]
> 
> nm and objdump provide exactly the same explanation as before.  This
> with NetCDF 4.1.1, gcc-4.5.0, config.log attached again.
> 
> Jed
> 
> 
> 

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: YQG-383700
Department: Support netCDF
Priority: Critical
Status: Closed