[netcdfgroup] Hello —

Hello —

I am trying to compile netCDF to use with FVCOM (they require the
netCDF library manually compiled with the same compiler - 

Linux localhost 2.6.22.12-desktop-1mdv #1 SMP Tue Nov 20 13:15:05 EST
2007 x86_64 Intel(R) Xeon(R) CPU            5160  @ 3.00GHz GNU/Linux

gcc (GCC) 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)


"make check" passes w/o any problems

) at the linking stage I get
...
.... viscofh.o print_vals.o rho_mean.o viz.o     -L/usr/local/lib 
-lnetcdff
/usr/local/lib/libnetcdff.a(netcdf.o): In function
`__netcdf__nf90_get_var_7d_eightbytereal':
netcdf.f90:(.text+0xd0e): undefined reference to `nf_get_varm_double'
netcdf.f90:(.text+0xed6): undefined reference to `nf_get_vars_double'
netcdf.f90:(.text+0x1086): undefined reference to `nf_get_vara_double'
/usr/local/lib/libnetcdff.a(netcdf.o): In function
`__netcdf__nf90_get_var_6d_eightbytereal':
netcdf.f90:(.text+0x1d3d): undefined reference to `nf_get_varm_double'
netcdf.f90:(.text+0x1ede): undefined reference to `nf_get_vars_double'
netcdf.f90:(.text+0x2067): undefined reference to `nf_get_vara_double'
/usr/local/lib/libnetcdff.a(netcdf.o): In function
`__netcdf__nf90_get_var_5d_eightbytereal':
netcdf.f90:(.text+0x2c84): undefined reference to `nf_get_varm_double'
netcdf.f90:(.text+0x2dfe): undefined reference to `nf_get_vars_double'
netcdf.f90:(.text+0x2f60): undefined reference to `nf_get_vara_double'
/usr/local/lib/libnetcdff.a(netcdf.o): In function
`__netcdf__nf90_get_var_4d_eightbytereal':
netcdf.f90:(.text+0x3ae6): undefined reference to `nf_get_varm_double'
netcdf.f90:(.text+0x3c39): undefined reference to `nf_get_vars_double'
netcdf.f90:(.text+0x3d74): undefined reference to `nf_get_vara_double'
/usr/local/lib/libnetcdff.a(netcdf.o): In function
`__netcdf__nf90_get_var_3d_eightbytereal':
.... 

and so on (about several 100 lines)

if I link against the binary (3.6.2 x86_64) I get:

...
  -L/usr/local/netCDF/lib  -lnetcdf
/usr/local/netCDF/lib/libnetcdf.a(netcdf.o): In function
`__netcdf__nf90_inq_libvers':
/shecky/netcdf/n3_shecky/netcdf-3.6.2/f90/netcdf_file.f90:5: undefined
reference to `_gfortran_copy_string'
/usr/local/netCDF/lib/libnetcdf.a(netcdf.o): In function
`__netcdf__nf90_strerror':
/shecky/netcdf/n3_shecky/netcdf-3.6.2/f90/netcdf_file.f90:12: undefined
reference to `_gfortran_copy_string'
/usr/local/netCDF/lib/libnetcdf.a(netcdf.o): In function
`__netcdf__nf90_inquire_dimension':
/shecky/netcdf/n3_shecky/netcdf-3.6.2/f90/netcdf_dims.f90:43: undefined
reference to `_gfortran_copy_string'
/usr/local/netCDF/lib/libnetcdf.a(netcdf.o): In function
`__netcdf__nf90_get_att_text':
/shecky/netcdf/n3_shecky/netcdf-3.6.2/f90/netcdf_attributes.f90:75:
undefined reference to `_gfortran_copy_string'
/usr/local/netCDF/lib/libnetcdf.a(netcdf.o): In function
`__netcdf__nf90_inquire_variable':
/shecky/netcdf/n3_shecky/netcdf-3.6.2/f90/netcdf_variables.f90:67:
undefined reference to `_gfortran_copy_string'
collect2: ld returned 1 exit status
make: *** [fvcom] Error 1

In any case it seems that the linker finds unresolved symbols in the
netCDF library itself (FVCOM compiles and runs w/o netCDF with no
problems)

What can be the problem? I would appreciate any help.

Mikhail.



  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: