When I try to run make for m3tools, I have undefined references to “nf_put_vara_int64_” and “nf_get_vara_int64_”.
How do I determine if this is an issue with my netCDF build or with my IOAPI/m3tools build? If it is with my IOAPI/m3tools build, how can I fix it?
Looking at libnetcdff.a with the nm command, both “nf_put_vara_int64_” and “nf_get_vara_int64_” are undefined. libioapi.a seems to have built correctly, but I don’t know how to verify this.
I’m using netCDF-C version 4.7.0 and netCDF-Fortran version 4.4.5 with GNU 9.4.0 compilers.
I have tried the following, with no success:
I have added -DIOAPI_NCF4=1 to the Makeinclude file.
I added the output of nf-config --flibs and nc-config --libs to LIBS in the m3tools Makefile.
I have attached my Makeinclude file, the Makefiles for ioapi and m3tools, and the make logs for ioapi and m3tools.
These symbols indicate that you have built netCDF with netCDF-4 not enabled, but are trying to use a libioapi.a for which it is enabled.
The simplest solution for where you say you are would probably be to re-build your netCDF libraries with netCDF enabled, and then re-link (note the make relink option in the Makefile, which can save you a bit of work/time in that last step…)
Do you have any suggestions for disabling netCDF-4 when building libioapi.a?
Follow the instructions in the I/O API Availability/Download/Installation document: the default installation is for netCDF with netCDF4 disabled. If you have an I/O API installation where you’ve modified the Makefiles, etc. as suggested by that so-called SMOKE Wiki, then blow them away first.
Actually, it is best to get the I/O API from GitHub, so that you can easily do updates without having to re-build the whole thing: