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.
Edin, The netCDF-4 software requires zlib, and szip cannot be used as a substitute for it. The configure script is specific to each software package, and different configure scripts do not necessarily take the same options. You can determine which options are legal for zlib by running ./configure --help from the zlib source distribution. This will tell you that it only accepts a small number of options and CFLAGS is not one of them. However, you can set the environment variable CFLAGS to "-m64" before running the configure script and it should work. The comments at the top of the zlib configure script also include these instructions: # To impose specific compiler or flags or install directory, use for example: # prefix=$HOME CC=cc CFLAGS="-O4" ./configure # or for csh/tcsh users: # (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) So depending on which kind of shell you are using, you should be able to just do something like $ export CFLAGS=-m64 $ export CC=gcc $ ./configure --prefix=/usr/local $ make test $ make install or using setenv for csh or tcsh shell. The configure script that comes with the zlib software is sort of old-fashioned, and evidently it was created manually rather than generated with the same tool used for HDF5 and netCDF-4. So you have to be adaptable and use whatever instructions come with each package to install it. They may look the same, but the build scripts typically have different options and conventions. The comments in the zlib Makefile even say that the default installation is in /usr/local, so you actually don't need the --prefix=/usr/local option to the configure script. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: LKB-522731 Department: Support netCDF Priority: Normal Status: Closed