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.
>To: address@hidden >From: Kevin Farnham <address@hidden> >Subject: NetCDF 64-bit Solaris build w/Fortran support >Organization: UCAR/Unidata >Keywords: 200212091942.gB9Jgv415625 Hi Kevin, > We need a 64-bit version of NetCDF with Fortran > support for operation on Solaris 64-bit architectures. OK, but you should realize that the 32-bit version will also work on 64-bit architectures. If you only supply the 64-bit version, it will force users to compile programs that call the netCDF library as 64-bit programs. In some cases, this will make the executables larger but provide no real benefits in performance or functionality. If you just want to be able to read large files, it is not necessary to compile 64-bit binaries. For large file support, I think you can just use CFLAGS='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' instead. > I downloaded the pre-built binaries from the UCAR web > site, but the download page does not indicate whether > the binaries are the 32-bit or 64-bit NetCDF version. > Since 32-bit is the default, I am assuming that the > prebuilt binary libraries are in fact the 32-bit > NetCDF version. Are 64-bit Solaris binaries available? The pre-built binaries are 32-bit versions. We don't currently make 64-bit versions available for Solaris. You're right that we should document exactly what compilers and flags were used to produce each binary. > I have not yet had success building a 64-bit version > of NetCDF with Fortran support for Solaris. I have a > question regarding the "Solaris" entry in the > INSTALL.html document ("Installing NetCDF"). Beneath > Solaris, there are 5 sections of macro definitions. > One of the sections that use the SUNWspro compiler has > a comment, "64-bit SPARC binary". Does this mean that > the 64-bit version of NetCDF can only be built using > the SUNWspro compilers? No, it just means we didn't test that particular platform/compiler/flags combination. > ... Is it not possible to build a > 64-bit NetCDF version using the GNU gcc/g77 compilers? You can certainly build a 64-bit C interface using gcc with the settings CC=gcc CFLAGS=-m64 FC='' F90='' CXX='' assuming you've got gcc-3.2. It might also work with gcc-3.0 or gcc-3.1, but I don't have those here to test. I don't know what flags to use with g77 to make it consistent with a C library built with gcc and CFLAGS=-m64. I tried g77 with FFLAGS=-m64 and CPPFLAGS=-Df2cFortran, but the resulting errors fort-attio.c:141: parse error before numeric constant fort-attio.c:141: parse error before '!' token fort-attio.c:141: parse error before numeric constant fort-attio.c:148: parse error before numeric constant fort-attio.c:148: warning: data definition has no type or storage class ... seem to indicate that something is wrong in the cfortran.h macros that tell how Fortran programs call C functions. I'm CC:ing Steve Emmerson on this reply, in case he can determine whether we can get this combination working. --Russ