I am having this same error on the build.bash run for the Upwelling test case. I am running on Mac OSX Mavericks.
I have successfully built netcdf-c and netcdf-fortran libraries from source code (I did not use MacPorts).
I installed netcdf-4 but disabled hd-5. Nevertheless, I commented-out the "export USE_NETCDF4=on" section in the build.bash file because it cannot find the libraries if I do turn that on.
When I run ./build.bash I get a lot of apparently proper execution, terminating with this:
Code: Select all
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_close", referenced from:
___mod_netcdf_MOD_netcdf_close.part.1 in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_create", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_def_dim", referenced from:
_def_dim_ in libUTIL.a(def_dim.o)
"___netcdf_MOD_nf90_def_var_manydims", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_def_var_scalar", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_enddef", referenced from:
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_text", referenced from:
___mod_netcdf_MOD_netcdf_close.part.1 in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
_lbc_getatt_ in libUTIL.a(lbc.o)
"___netcdf_MOD_nf90_get_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_1d in libMODS.a(mod_netcdf.o)
___nf_fread2d_mod_MOD_nf_fread2d in libUTIL.a(nf_fread2d.o)
___nf_fread3d_mod_MOD_nf_fread3d in libUTIL.a(nf_fread3d.o)
"___netcdf_MOD_nf90_get_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d.constprop.3 in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_attname", referenced from:
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_check_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_varid", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d.constprop.3 in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_2d in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_inquire", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_check_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_attribute", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_dimension", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_variable", referenced from:
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_check_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_open", referenced from:
___mod_netcdf_MOD_netcdf_open.part.0 in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_att_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_text", referenced from:
_lbc_putatt_ in libUTIL.a(lbc.o)
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
_def_info_ in libUTIL.a(def_info.o)
"___netcdf_MOD_nf90_put_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
___nf_fwrite2d_mod_MOD_nf_fwrite2d in libUTIL.a(nf_fwrite2d.o)
___nf_fwrite3d_mod_MOD_nf_fwrite3d in libUTIL.a(nf_fwrite3d.o)
"___netcdf_MOD_nf90_put_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_redef", referenced from:
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_strerror", referenced from:
_close_out_ in libUTIL.a(close_io.o)
"___netcdf_MOD_nf90_sync", referenced from:
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [/Users/Connor/ROMS/Projects/Upwelling/oceanS] Error 1
I am not sure how to deal with this error- uninstalling the netcdf libraries did not help me (I'm not sure how that fixed it for the other user here).
Any help or direction would be very much appreciated.
-Connor