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: Mahally Kudsy <address@hidden> >Subject: Fail to compile nctest >Organization: . >Keywords: 199701280134.SAA07785 Hi Mahally, > I try to compile netcdf, but not successful yet. > My workstation is Sparc5. The message out was: > > cc -c -O -I../libsrc -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG > -DNO_STRERROR varget.c > cc -c -O -I../libsrc -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG > -DNO_STRERROR vargetg.c > cc -c -O -I../libsrc -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG > -DNO_STRERROR varput.c > cc -c -O -I../libsrc -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG > -DNO_STRERROR varputg.c > cc -c -O -I../libsrc -DNO_HAVE_PROTOTYPES -Dconst= -DNO_STDARG > -DNO_STRERROR vardef.c > "vardef.c", line 30: FLT_EPSILON undefined > "vardef.c", line 61: DBL_EPSILON undefined It appears as if you are using the old /usr/ucb/cc C compiler, which does not compile ANSI C. You can use "which cc" to see where your C compiler is being executed from. If you can use an ANSI C compiler by changing your PATH environment variable or CC environment variable to point to the Sun C compiler or another ANSI C compiler, the compilation should work after a "make clean". Otherwise, you may be able to workaround this problem by including the following definitions before line 30 of nctest/vardef.c #define FLT_EPSILON 1.192092896E-07F #define DBL_EPSILON 2.2204460492503131E-16 Then "make clean" and "make all" to see if that gets you further. _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu