This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hello, It appears that when you are running make test, it fails to link the test programs against libnetcdf. You may need to specify "LIBS=-lnetcdf" when running 'make check', e.g. $ LIBS="-lnetcdf" make check I hope this helps; I will see if there is anything we can do about this issue on our end. Have a great day, -Ward > Dear Sir/Madam, > > I'm trying to install netcdf-fortran-4.4.4 but unfortunately it gives > error while running make check test as below. It will be my pleasure if > you help me. > > Respectfully, > Ehsan > > /bin/bash ../libtool --tag=F77 --mode=link mpif90 -I../fortran > -I../fortran -g -O2 -L/usr/local/lib -o nf_test f03lib_f_interfaces.o > test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o > util.o f03lib.o ../fortran/libnetcdff.la > libtool: link: mpif90 -I../fortran -I../fortran -g -O2 -o .libs/nf_test > f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o > test_read.o test_write.o util.o f03lib.o -L/usr/local/lib > ../fortran/.libs/libnetcdff.so > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vara_short' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vara_short' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_att_float' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vara_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_attname' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_set_default_format' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_dimname' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vara_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vara_text' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_dim' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vars_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_open_mem' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_nvars' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_varm_float' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vara_float' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_vars_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_open' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_att_short' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var1_short' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var_float' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_set_base_pe' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_format' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_vara' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_varm_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_varm_float' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vars_short' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc__create' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_varndims' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var1_float' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_attlen' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_def_var' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vara_float' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vars_float' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_vars' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc__open_mp' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_att_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_var1_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_dimlen' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_delete_mp' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var1_short' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc__enddef' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vars_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var1_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_varm_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_copy_var' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_var1' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_varm_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_vara_int' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vara_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_base_pe' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_rename_var' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_redef' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_att' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_att_text' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var1_text' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var_short' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_vardimid' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_att_short' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_rename_att' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vara_double' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc__open' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_varm_int' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_varm_short' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_vara_int' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_varm_double' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_ndims' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vars_float' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vara_text' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_varm_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var_double' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_var1_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_var_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_vars' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var_float' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_libvers' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_sync' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var1_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_varm_short' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_att_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_vars_int' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_att_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var1_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_var1' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_natts' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vars_short' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_close' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_dimid' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_varm_text' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_unlimdim' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_del_att' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_att_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_abort' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vars_text' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_def_dim' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_att_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_varm_text' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_vartype' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_var_text' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_strerror' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_varname' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_set_fill' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_enddef' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_path' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_att_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var_short' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_att_float' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_varid' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var1_schar' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_attid' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_vara' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_att_text' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_var1_text' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_create' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_rename_dim' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vars_double' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_var1_float' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_copy_att' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_put_vars_text' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_varnatts' > ../fortran/.libs/libnetcdff.so: undefined reference to > `nc_get_vars_double' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_var_text' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_delete' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_atttype' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_var' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_var_int' > ../fortran/.libs/libnetcdff.so: undefined reference to `nc__create_mp' > collect2: error: ld returned 1 exit status > make[2]: *** [Makefile:1241: nf_test] Error 1 > make[2]: Leaving directory > '/home/ehsan/PROGRAMS/netcdf-fortran-4.4.4/netcdf-fortran-4.4.4/nf_test' > make[1]: *** [Makefile:1814: check-am] Error 2 > make[1]: Leaving directory > '/home/ehsan/PROGRAMS/netcdf-fortran-4.4.4/netcdf-fortran-4.4.4/nf_test' > make: *** [Makefile:534: check-recursive] Error 1 > > > -- > Ehsan Sadighrad > > PhD. Student, > Department of Physical Oceanography, > Institute of Marine Sciences, > Middle East Technical University, > Erdemli - Turkey. > Ticket Details =================== Ticket ID: NWQ-392085 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.