Fernando, Those errors all indicate that the Fortran functions are not correctly calling the C functions. For released versions of the netCDF Fortran library, you sometimes have to specify the right C compiler flag when building the C library, so it will use the conventions expected by the Fortran compiler in C functions to be called by Fortran. The configure script can often determine this correctly, but not always. When it doesn't, you have to help by indicating the Fortran compiler that will be used when you are building the C library. It looks like you are using gfortran, so try reconfiguring and rebuilding the library, defining the environment variable CPPFLAGS=-DgFortran before running the configure script. If that doesn't work, please send us the config.out file resulting from running the configure script, as well as the complete output from "make check". --Russ > Hi, I ran "make check" and appear the following errors: > > First: all previous test are OK > Then: > ... > test_get.o: In function `test_nf_get_att_double_': > /opt/netcdf/nf_test/test_get.F:5511: undefined reference to `nf_open_' > /opt/netcdf/nf_test/test_get.F:5521: undefined reference to > `nf_get_att_double_' > /opt/netcdf/nf_test/test_get.F:5526: undefined reference to > `nf_get_att_double_' > /opt/netcdf/nf_test/test_get.F:5529: undefined reference to > `nf_get_att_double_' > /opt/netcdf/nf_test/test_get.F:5547: undefined reference to > `nf_get_att_double_' > /opt/netcdf/nf_test/test_get.F:5594: undefined reference to `nf_close_' > ... > > ../fortran/.libs/libnetcdff.so: undefined reference to `nf_def_var_endian_' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nf_inq_compound_fieldname_' > ../fortran/.libs/libnetcdff.so: undefined reference to `nf_inq_typeid_' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nf_def_var_chunking_' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nf_inq_compound_fieldindex_' > ../fortran/.libs/libnetcdff.so: undefined reference to `nf_inq_var_deflate_' > ../fortran/.libs/libnetcdff.so: undefined reference to `nf__create_' > > ... > > ../fortran/.libs/libnetcdff.so: undefined reference to `nf_get_var1_int64_' > collect2: ld returned 1 exit status > make[2]: *** [nf_test] Error 1 > make[2]: Leaving directory `/opt/netcdf/nf_test' > make[1]: *** [check-am] Error 2 > make[1]: Leaving directory `/opt/netcdf/nf_test' > make: *** [check-recursive] Error 1 > > Thank for your help > > --Fernando > > > address@hidden> wrote: > > > > Hi, sorry for my delay response... > > > I need to install netcdf for ARW-WRF model > > > > > > When I try to compile the wrf model, There are some errorrs: > > > > > > ... > > > x=`echo "gfortran -w -ffree-form -ffree-line-length-none > > > -fconvert=big-endian -frecord-marker=4 " | awk '{print $1}'` ; export x > > ; \ > > > if [ $x = "gfortran" ] ; then \ > > > echo removing external declaration of iargc for gfortran ; \ > > > /lib/cpp -C -P -C -P -traditional -I/usr/local/netcdf/include > > > -I../ioapi_share diffwrf.F90 | sed '/integer *, *external.*iargc/d' > > > > diffwrf.f ;\ > > > else \ > > > /lib/cpp -C -P -C -P -traditional -I/usr/local/netcdf/include > > > -I../ioapi_share diffwrf.F90 > diffwrf.f ; \ > > > fi > > > removing external declaration of iargc for gfortran > > > gfortran -w -ffree-form -ffree-line-length-none -fconvert=big-endian > > > -frecord-marker=4 -c -I/usr/local/netcdf/include -I../ioapi_share > > > diffwrf.f > > > diffwrf io_netcdf is being built now. > > > wrf_io.o: In function `ext_ncd_get_var_info_': > > > wrf_io.f:(.text+0x1fe7): undefined reference to `nf_inq_varid_' > > > wrf_io.f:(.text+0x227d): undefined reference to `nf_inq_vartype_' > > > wrf_io.f:(.text+0x2720): undefined reference to `nf_get_att_int_' > > > wrf_io.f:(.text+0x307f): undefined reference to `nf_get_att_text_' > > > wrf_io.f:(.text+0x3361): undefined reference to `nf_inq_vardimid_' > > > wrf_io.f:(.text+0x33c8): undefined reference to `nf_inq_dimlen_' > > > wrf_io.f:(.text+0x341d): undefined reference to `nf_inq_dimlen_' > > > wrf_io.f:(.text+0x3481): undefined reference to `nf_inq_dimlen_' > > > ... > > > > > > /usr/local/netcdf/lib/libnetcdff.so: undefined reference to > > > `nf_get_varm_double_' > > > /usr/local/netcdf/lib/libnetcdff.so: undefined reference to > > > `nf_def_var_endian_' > > > /usr/local/netcdf/lib/libnetcdff.so: undefined reference to > > > `nf_inq_compound_fieldname_' > > > /usr/local/netcdf/lib/libnetcdff.so: undefined reference to > > `nf_inq_typeid_' > > > /usr/local/netcdf/lib/libnetcdff.so: undefined reference to > > > `nf_put_varm_int1_' > > > /usr/local/netcdf/lib/libnetcdff.so: undefined reference to > > > `nf_def_var_chunking_ > > > > > > .... > > > > > > Then I run command "find / -name libnetcdff.so" > > > /usr/local/netcdf/lib/libnetcdff.so > > > > > > > > > Any suggestions? > > > > You may want to ask the address@hidden mailing list, because the > > errors > > above have to do with how WRF links its programs to an installed netCDF > > library. > > If "make check" worked OK for the Fortran tests, then the library was built > > correctly. > > > > --Russ > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: NTO-571747 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: NTO-571747 Department: Support netCDF Priority: Normal Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.