Re: netCDF make problem with ANSI C compiler on Sun 4/74

Thanks to Marty Ryba, I have an answer to my question posted earlier today:

> I tried unsuccessfully to make netCDF with the new ANSI C compiler on my Sun
> 4/75 running SunOS 4.1.1.  The second attempt using Sun's C compiler worked.
> ... Has anybody had a similar problem?

Two changes are required.

1) The first fixes an invalid value for XDR_D_INFINITY (previously not flagged
as invalid).  In netcdf.h, change the line:
        #define XDR_D_INFINITY  1.797693134862315900e+308
to: 
        #define XDR_D_INFINITY  1.797693134862315700e+308
as per /usr/local/lang/SC1.0/ansi_include/float.h (only the one digit 9 --> 7)

2) The second allows the ANSI C compiler to find the proper libraries.
 In local_nc.h, comment a section:
/*
 * Currently there are situations where one has a compiler which
 * defines __STDC__ but the system doesn't have conforming libs
 * or include files - gcc or saber c on a sun or ultrix or vanilla unix
 * or scc on a Cray.
 *   Sigh.
 */
/* #if defined(sun) || defined(cray)    Comment the 6 lines starting here!
#undef STDC_ARGS
#undef STDC_STRERROR
#undef STDC_REMOVE
#undef STDC_INCLUDES
#endif
*/

These two changes are required before using the ANSI C compiler:
In Makefile:
CC      = /usr/local/lang/acc#          ANSI C compiler.  SunOS 4.1.1

Then make has no errors:
        > make all >& Make.log
        > make install >>& Make.log
        > make clean

Fred
=Fred Knight   (INTERNET:knight@xxxxxxxxxx)


  • 1992 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: