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.
Scott, [Russ asked me to help you.] >Date: Tue, 16 Sep 1997 17:23:55 -0600 >From: "Scott R. Wilson" <address@hidden> >Organization: Bio-Rad Semiconductor Division, CD Systems >To: address@hidden >Subject: DEC Alpha, Linux, and netCDF-3.3.1 - compile failure >Keywords: 199709162327.RAA11816 In the above message, you wrote: > I am attempting to bring netCDF-3.3.1 up on a DEC Alpha, running Red > Hat Linux 4.2 (Microway), 2.0.30 kernel. We are running the newest gcc > and g77, namely gcc2.7.2.3 and g77-0.5.21. (I am happy to report that > g77 appears to work correctly out of the box with this combination on > Alpha/Linux). Cool! > > I am encountering a compile failure and was wondering if you might > be able to help me. What it comes down to is that cpp is coming > up with a bogus integer constant for LONG_MAX in ncx.c, namely > 9223372036854775807LL (note the LL at the end). The compile output is > as follows: > > AWG_Alpha:/usr/home/swilson/netcdf-3.3.1/src make > make[1]: Entering directory `/usr/home/swilson/netcdf-3.3.1/src' > > Making `all' in directory /usr/home/swilson/netcdf-3.3.1/src/libsrc > > make[2]: Entering directory `/usr/home/swilson/netcdf-3.3.1/src/libsrc' > cc -c -O -I. -DNDEBUG attr.c > cc -c -O -I. -DNDEBUG dim.c > cc -c -O -I. -DNDEBUG error.c > cc -c -O -I. -DNDEBUG -DVERSION=`cat ../VERSION` libvers.c > cc -c -O -I. -DNDEBUG nc.c > cc -c -O -I. -DNDEBUG ncio.c > cc -c -O -I. -DNDEBUG ncx.c > ncx.c:288: two `l's in integer constant > ncx.c:381: two `l's in integer constant > ncx.c:387: two `l's in integer constant > ncx.c:525: two `l's in integer constant > ncx.c:532: two `l's in integer constant > ncx.c:631: two `l's in integer constant > ncx.c:637: two `l's in integer constant > make[2]: *** [ncx.o] Error 1 > make[2]: Leaving directory `/usr/home/swilson/netcdf-3.3.1/src/libsrc' > make[1]: *** [subdir_target] Error 1 > make[1]: Leaving directory `/usr/home/swilson/netcdf-3.3.1/src' > make: *** [libsrc/all] Error 2 > AWG_Alpha:/usr/home/swilson/netcdf-3.3.1/src > > The problem turns up in places such as line 288 in ncx.c where: > > #if SIZEOF_IX_SHORT == SIZEOF_LONG && IX_SHORT_MAX == LONG_MAX > > tries to parse LONG_MAX as 9223372036854775807LL and provides the errors > noted. > > Is there a fix for this? I have seen indications that folks have been running > 3.3.1 on Linux/Alpha so I am encouraged that it can be done. I grubbed around > on the UCAR NetCDS web area for bugs fixes for this problem but did not find > anything. The C macro "LONG_MAX" should be defined in the file "/usr/include/limits.h" on your system. What is it there? > > Thank you very much for your assistance and fine software (works great for > us under Linux/Intel)! > > Scott Wilson > Bio-Rad Semiconductor Division, CD Systems > 3817 Academy Pkwy S, NE > Albuquerque, NM 87109 > (505)343-8112(O) > (505)343-1732(F) > address@hidden > -OR=- > address@hidden > > PS: The output from ./configure is as follows: > AWG_Alpha:/usr/home/swilson/netcdf-3.3.1/src ./configure --prefix=/usr/local > creating cache ./config.cache > checking for m4... m4 > checking for xlc... no > checking for c89... no > checking for acc... no > checking for cc... cc > checking C compiler... works > checking how to make dependencies... false > checking for CC... no > checking for cxx... no > checking for c++... c++ > checking C++ compiler "c++"... works > checking how to run the C preprocessor... cc -E > checking for f77... f77 > checking for FORTRAN .F compiler... > checking if FORTRAN compiler handles *.F files... yes > checking for C-equivalent to FORTRAN routine "SUB"... sub_ > checking for FORTRAN "byte"... yes > checking for FORTRAN "integer*2"... yes > checking if FORTRAN "byte" is C "signed char"... yes > checking if FORTRAN "byte" is C "short"... no > checking if FORTRAN "byte" is C "int"... no > checking if FORTRAN "integer*2" is C "short"... yes > checking if FORTRAN "integer*2" is C "int"... no > checking if FORTRAN "integer" is C "int"... yes > checking if FORTRAN "real" is C "float"... yes > checking if FORTRAN "doubleprecision" is C "double"... yes > checking for FORTRAN-equivalent to netCDF "byte"... byte > checking for FORTRAN-equivalent to netCDF "short"... integer*2 > checking for math library > checking for -lc... no > checking for -lm... yes > checking for ar... ar > checking for ranlib... ranlib > checking for stdlib.h... yes > checking for sys/types.h... yes > checking for strerror... yes > checking for ftruncate... yes > checking for st_blksize in struct stat... yes > checking whether cross-compiling... no > checking for IEEE floating point format... yes > checking for ANSI C header files... yes > checking for size_t... yes > checking for off_t... yes > checking for ssize_t... yes > checking for ptrdiff_t... yes > checking for uchar... no > checking whether char is unsigned... no > checking whether byte ordering is bigendian... no > checking size of short... 2 > checking size of int... 4 > checking size of long... 8 > checking size of float... 4 > checking size of double... 8 > checking size of off_t... 8 > checking size of size_t... 8 > checking for manual-page index command... > checking binary distribution directory... /home/ftp/pub/binary/dummy_system > updating cache ./config.cache > creating ./config.status > creating macros.make > udcreating fortran/nfconfig.inc > fortran/nfconfig.inc is unchanged > creating libsrc/ncconfig.h > AWG_Alpha:/usr/home/swilson/netcdf-3.3.1/src The standard output from the configure script looks OK. -------- Steve Emmerson <http://www.unidata.ucar.edu>