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.
Pavel, > This is a good idea to make shared libraries the default. > In addition, it is worth doing the command "make clean" to be able to remove > all netcdf libraries (both with ".so" and ".a" extensions) from previous > installations. Thanks for the suggestion. We have a "make uninstall" that's supposed to do that, but it hasn't been tested extensively. I think "make clean" should be something that can be run by an ordinary user to clean the source directories from a build, whereas you may need root or sudo privileges to run "make uninstall". --Russ > address@hidden> wrote: > > > > Russ, > > > > > > To let you know, I have again reinstalled netcdf with the option of the > > use > > > of shared libraries. > > > Then I was able to installed WRF without compilation errors and to obtain > > > exe-files. > > > > Great, I'm glad to hear it! We're making shared libraries the default for > > version > > 4.1.2 and greater, so maybe things like this will get easier. > > > > --Russ > > > > > Thank you very much indeed for your support, > > > Pavel > > > > > > > > > On Mon, Mar 28, 2011 at 7:41 PM, Pavel Kishcha <address@hidden > > >wrote: > > > > > > > Russ, > > > > > > > > Thank you for your suggestion. > > > > I have deleted all files *.so in the directory /usr/local/netcdf411/lib > > > > and reinstalled netcdf 4.1.1. anew. > > > > After compiling WRF, I found that the number of installation errors > > reduced > > > > significantly. > > > > However, some errors relating to netcdf libraries remain on hand. See > > the > > > > attached file for details. Below are some examples. > > > > > > > > Thank you, > > > > Pavel > > > > > > > > Examples of errors > > > > > > > > /usr/local/netcdf411/lib/libnetcdf.a(liboc_la-ocinternal.o): In > > function > > > > `ocinitialize': > > > > ocinternal.c:(.text+0x2b9): undefined reference to `curl_version_info' > > > > /usr/local/netcdf411/lib/libnetcdf.a(liboc_la-http.o): In function > > > > `ocfetchhttpcode': > > > > http.c:(.text+0x29): undefined reference to `curl_easy_getinfo' > > > > /usr/local/netcdf411/lib/libnetcdf.a(liboc_la-http.o): In function > > > > `ocfetchurl_file': > > > > http.c:(.text+0xa4): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0xcc): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0xf3): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0x11b): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0x13a): undefined reference to `curl_easy_perform' > > > > http.c:(.text+0x17c): undefined reference to `curl_easy_getinfo' > > > > http.c:(.text+0x1a4): undefined reference to `curl_easy_strerror' > > > > /usr/local/netcdf411/lib/libnetcdf.a(liboc_la-http.o): In function > > > > `ocfetchurl': > > > > http.c:(.text+0x222): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0x24a): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0x271): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0x299): undefined reference to `curl_easy_setopt' > > > > http.c:(.text+0x2a8): undefined reference to `curl_easy_perform' > > > > http.c:(.text+0x2bb): undefined reference to `curl_easy_strerror' > > > > http.c:(.text+0x300): undefined reference to `curl_easy_getinfo' > > > > http.c:(.text+0x368): undefined reference to `curl_easy_strerror' > > > > > > > > > > > > > > > > > > > > address@hidden> wrote: > > > > > > > >> Pavel, > > > >> > > > >> > In addition to my yesterday message (below), today I have > > reinstalled > > > >> netcdf > > > >> > 4.1.1 > > > >> > in order to put the output to a specified place: > > > >> > ./configure --prefix=/usr/local/netcdf411 > > > >> > > > > >> > The installation was successful as you can see in the attached file > > > >> > make_check_install_110328.log. > > > >> > > > > >> > However, when I tried to compile the WRF v.3.2.1 program, I got the > > > >> output > > > >> > that many references in netcdf libraries were undefined (see > > examples > > > >> > below). > > > >> > I know that you are responsible only for netcdf and not for WRF. But > > > >> maybe > > > >> > you can explain to me where the problem is. > > > >> > > > >> It looks like your successful installation did not use shared > > libraries > > > >> (which have the ".so" shared object extension, but instead used static > > > >> libraries with a ".a" extension. However, if you had previously > > installed > > > >> shared libraries in the same directory /usr/local/netcdf411/lib/, > > these > > > >> may be interfering with your ability to link to the static libraries. > > I > > > >> suggest that you delete (or rename or move to another directory that > > won't > > > >> be searched) the file /usr/local/netcdf411/lib/libnetcdff.so, and then > > try > > > >> the WRF link step again. WRF should then find the functions with the > > > >> right > > > >> names in /usr/local/netcdf411/lib/libnetcdf.a, which appears to be > > where > > > >> the > > > >> successful install archived them. > > > >> > > > >> --Russ > > > >> > > > >> > Examples of WRF installation errors: > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_varm_double_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_varm_int1_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_vars_int1_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> `nf__create_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> `nf_inq_dim_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_varm_text_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf__open_mp_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_varm_real_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_var1_real_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_varm_double_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_vara_int2_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_vara_int2_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_var1_int2_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_varm_text_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_att_int2_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_rename_var_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_inq_libvers_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_att_int1_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> `nf_abort_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_var1_int2_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_vars_int_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_var1_double_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_vars_double_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_inq_attname_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_put_vara_int1_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_inq_format_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_vara_int1_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf__create_mp_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> > `nf_get_var1_int1_' > > > >> > /usr/local/netcdf411/lib/libnetcdff.so: undefined reference to > > > >> `nf__enddef_' > > > >> > > > > >> > > > > >> > > > > >> > > > address@hidden > > > >> >wrote: > > > >> > > > > >> > > Russ, > > > >> > > > > > >> > > Ignor my previous message. > > > >> > > Now I have set the following environmental variables (see attached > > > >> file > > > >> > > env_110327): > > > >> > > export FC=gfortran44 > > > >> > > export CC=gcc44 > > > >> > > export CFLAGS="-DgFortran" > > > >> > > > > > >> > > Then, I run the following commands: make clean; ./configure; make > > > >> check > > > >> > > compile. > > > >> > > It looks like the compilation was successful. But I am not sure. > > Could > > > >> you > > > >> > > check the attached files, config.log and > > > >> make_check_install_110327.log, > > > >> > > for details? > > > >> > > > > > >> > > According to you suggestion, I also run the following commands: > > > >> > > > > > >> > > root@cyclone netcdf-4.1.1# cd > > > >> > > /home/pavel/WRF_v321/netcdf-4.1.1/fortran/.libs > > > >> > > root@cyclone .libs# file fort-lib.o libnetcdff.a > > > >> > > fort-lib.o: ERROR: cannot open `fort-lib.o' (No such file or > > > >> directory) > > > >> > > > > > >> > > libnetcdff.a: current ar archive > > > >> > > root@cyclone .libs# nm -a libnetcdff.a | grep nf_open > > > >> > > 0000000000000546 T nf_open_ > > > >> > > U nf_open_ > > > >> > > > > > >> > > > > > >> > > What is your opinion? > > > >> > > > > > >> > > Thank you, > > > >> > > Pavel > > > >> > > > > > >> > > > > > >> > > > > > >> address@hidden>wrote: > > > >> > > > > > >> > >> Russ, > > > >> > >> > > > >> > >> First, here is the output for your commands: > > > >> > >> > > > >> > >> root@cyclone fortran# cd > > /home/pavel/WRF_v321/netcdf-4.1.1/fortran > > > >> > >> root@cyclone fortran# file fort-lib.o libnetcdff.a > > > >> > >> fort-lib.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 > > > >> (SYSV), > > > >> > >> not stripped > > > >> > >> libnetcdff.a: ERROR: cannot open `libnetcdff.a' (No such file or > > > >> > >> directory) > > > >> > >> root@cyclone fortran# nm -a libnetcdff.a | grep nf_open > > > >> > >> nm: 'libnetcdff.a': No such file > > > >> > >> > > > >> > >> Second, I tried "make clean", then I specified the environment > > > >> variable > > > >> > >> CFLAGS="-DgFortran" (see attached file env_110325), and then > > "make > > > >> check > > > >> > >> install". Here is the output (see attached files for details): > > > >> > >> > > > >> > >> *** Test: varm on URL: > > > >> > >> http://test.opendap.org/opendap/data/nc/coads_climatology.nc > > > >> > >> *** Testing: stride case 1 > > > >> > >> *** nc function failure: -33 NetCDF: Not a valid ID > > > >> > >> FAIL: test_varm3 > > > >> > >> ================================================ > > > >> > >> 3 of 4 tests failed > > > >> > >> Please report to address@hidden > > > >> > >> ================================================ > > > >> > >> make[3]: *** [check-TESTS] Error 1 > > > >> > >> make[3]: Leaving directory > > > >> `/home/pavel/WRF_v321/netcdf-4.1.1/ncdap_test' > > > >> > >> make[2]: *** [check-am] Error 2 > > > >> > >> make[2]: Leaving directory > > > >> `/home/pavel/WRF_v321/netcdf-4.1.1/ncdap_test' > > > >> > >> make[1]: *** [check-recursive] Error 1 > > > >> > >> make[1]: Leaving directory > > > >> `/home/pavel/WRF_v321/netcdf-4.1.1/ncdap_test' > > > >> > >> make: *** [check-recursive] Error 1 > > > >> > >> > > > >> > >> > > > >> > >> Finally, after all changes, I run again your commands: > > > >> > >> > > > >> > >> root@cyclone netcdf-4.1.1# cd > > > >> /home/pavel/WRF_v321/netcdf-4.1.1/fortran > > > >> > >> root@cyclone fortran# file fort-lib.o libnetcdff.a > > > >> > >> fort-lib.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 > > > >> (SYSV), > > > >> > >> not stripped > > > >> > >> libnetcdff.a: ERROR: cannot open `libnetcdff.a' (No such file or > > > >> > >> directory) > > > >> > >> root@cyclone fortran# nm -a libnetcdff.a | grep nf_open > > > >> > >> nm: 'libnetcdff.a': No such file > > > >> > >> > > > >> > >> > > > >> > >> Thank you very much for your support, > > > >> > >> Pavel > > > >> > >> > > > >> > >> > > > >> > >> address@hidden> wrote: > > > >> > >> > > > >> > >>> Pavel, > > > >> > >>> > > > >> > >>> > > > >> > >>> OK, the output is puzzling, because the gfortran44 compiler is > > still > > > >> > >>> not finding the C functions it needs to call from Fortran. > > Could > > > >> you > > > >> > >>> please run the following commands and send me the output. I've > > also > > > >> > >>> provided the output I get when running the analogous commands > > (in my > > > >> > >>> build directory) for comparison: > > > >> > >>> > > > >> > >>> $ cd /home/pavel/WRF_v321/netcdf-4.1.1/fortran/.libs > > > >> > >>> $ file fort-lib.o libnetcdff.a > > > >> > >>> fort-lib.o: ELF 64-bit LSB relocatable, x86-64, version 1 > > (SYSV), > > > >> not > > > >> > >>> stripped > > > >> > >>> libnetcdff.a: current ar archive > > > >> > >>> $ nm -a libnetcdff.a | grep nf_open > > > >> > >>> 0000000000000270 T nf_open_ > > > >> > >>> 0000000000000170 T nf_open_par_ > > > >> > >>> U nf_open_ > > > >> > >>> U nf_open_par_ > > > >> > >>> > > > >> > >>> Thanks. > > > >> > >>> > > > >> > >>> --Russ > > > >> > >>> > > > >> > >>> > > > >> > >>> Russ Rew UCAR Unidata > > > >> Program > > > >> > >>> address@hidden > > > >> http://www.unidata.ucar.edu > > > >> > >>> > > > >> > >>> > > > >> > >>> > > > >> > >>> Ticket Details > > > >> > >>> =================== > > > >> > >>> Ticket ID: VUQ-446360 > > > >> > >>> Department: Support netCDF > > > >> > >>> Priority: Normal > > > >> > >>> Status: Closed > > > >> > >>> > > > >> > >>> > > > >> > >> > > > >> > > > > > >> > > > > >> > > > > >> > > > >> Russ Rew UCAR Unidata Program > > > >> address@hidden > > http://www.unidata.ucar.edu > > > >> > > > >> > > > >> > > > >> Ticket Details > > > >> =================== > > > >> Ticket ID: VUQ-446360 > > > >> Department: Support netCDF > > > >> Priority: Normal > > > >> Status: Closed > > > >> > > > >> > > > > > > > > > > > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: VUQ-446360 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: VUQ-446360 Department: Support netCDF Priority: Normal Status: Closed