[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

960604: installing netCDF on Ultrix DECStation



Dear Ling Tang

> >To: address@hidden
> >cc: address@hidden
> >From: address@hidden
> >Subject: Question about installation of netcdf
> >Organization: Massachusetts Institute of Technology
> >Keywords: 199606040536.AA21026

In the above message you wrote:

>       Our research group plans to use netcdf, but we have trouble
> to have it installed. It is a Dec 5000/25 Workstation running Ultrix. 
> The way I did is first download netcdf.tar, and put it under /usr/local,
> after uncompressed with "tar xvf netcdf.tar", I got  a directory called
> "netcdf-2.4.2", and cd to src and execute configuration file with
> "configure --prefix=/usr/local", it seems to me it was working well,
> nothing happened except a warning of xdr lib, says using own (provided by
> netcdf package, I saw the explanation in install file), but when I did 
> "make all", error occured, saying sth undefined, I attached the config.log and
> the make all log file, hope can get some clues,
> 
> Thanks for your time and consideration,
> 
> Regards,
> 
> Ling Tang
> 
> 
> ******************************
> attached make all log file
> ******************************
> making `all' in directory /usr/local/netcdf-2.4.2/src/port
> 
> 
> returning to directory /usr/local/netcdf-2.4.2/src
> 
> 
> making `all' in directory /usr/local/netcdf-2.4.2/src/xdr
> 
> cc -c -O -I/usr/include/rpc   -std -Dconst= xdr.c
> ccom: Warning: (null), line 1: standard C not fully supported

It looks like you don't have a Standard C compiler.  Thought you might
still be able to build the netCDF package, I would urge you to get a
Standard C compiler as soon as possible.  At the very least, you can
obtain the free GNU C compiler.

...

> making `all' in directory /usr/local/netcdf-2.4.2/src/ncdump
> 
> cc -c -O -I../libsrc   -std -Dconst= ncdump.c
> ccom: Warning: (null), line 1: standard C not fully supported
> cc -c -O -I../libsrc   -std -Dconst= vardata.c
> ccom: Warning: (null), line 1: standard C not fully supported
> ccom: Error: vardata.c, line 44: FLT_EPSILON undefined
>           float_eps = FLT_EPSILON;
>       ---------------------------^
> ccom: Error: vardata.c, line 75: DBL_EPSILON undefined
>           double_eps = DBL_EPSILON;
>       ----------------------------^
> *** Error code 1
> 
> Stop.

It appears that your C header file `/usr/include/float.h' doesn't
define the macros FLT_EPSILON and DBL_EPSILON.  It should.

Try applying the enclosed patch to the file `ncdump/vardata.c'.  It
should adapt the C code to systems whose <float.h> doesn't define the
macros FLT_EPSILON and DBL_EPSILON.

> *** Error code 1
> 
> Stop.
> 
> ************************************
> attached config.log
> ************************************
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.

There were many errors in the file `config.log' -- some of them looked
serious enough to make me wonder if you'll be able to build the netCDF
package.  We'll just have to see.

Please let me know if this helps.  If you have additional problems, then
would you please send me the following:

    1.  The output from executing the command `uname -a'.

    2.  The output from executing the `configure' script.

    3.  The output from executing the `make' command.

--------
Steve Emmerson   <address@hidden>

--------Begin patch for ncdump/vardata.c
Index: vardata.c
===================================================================
RCS file: /upc/share/CVS/netcdf/ncdump/vardata.c,v
retrieving revision 1.41
diff -c -r1.41 vardata.c
*** 1.41        1996/02/06 17:26:00
--- vardata.c   1996/06/04 15:08:15
***************
*** 41,48 ****
  {
      float float_eps;
  #ifndef NO_FLOAT_H
      float_eps = FLT_EPSILON;
! #else /* NO_FLOAT_H */
      {
        float etop, ebot, eps;
        float one = 1.0;
--- 41,52 ----
  {
      float float_eps;
  #ifndef NO_FLOAT_H
+ #ifdef FLT_EPSILON
      float_eps = FLT_EPSILON;
! #define UD_HAVE_FLT_EPSILON
! #endif
! #endif
! #ifndef UD_HAVE_FLT_EPSILON
      {
        float etop, ebot, eps;
        float one = 1.0;
***************
*** 62,68 ****
        }
        float_eps = two * etop;
      }
! #endif /* NO_FLOAT_H */
      return float_eps;
  }
  
--- 66,72 ----
        }
        float_eps = two * etop;
      }
! #endif /* UD_HAVE_FLT_EPSILON */
      return float_eps;
  }
  
***************
*** 72,79 ****
  {
      double double_eps;
  #ifndef NO_FLOAT_H
      double_eps = DBL_EPSILON;
! #else /* NO_FLOAT_H */
      {
        double etop, ebot, eps;
        double one = 1.0;
--- 76,87 ----
  {
      double double_eps;
  #ifndef NO_FLOAT_H
+ #ifdef DBL_EPSILON
      double_eps = DBL_EPSILON;
! #define UD_HAVE_DBL_EPSILON
! #endif
! #endif
! #ifndef UD_HAVE_DBL_EPSILON
      {
        double etop, ebot, eps;
        double one = 1.0;
***************
*** 93,99 ****
        }
        double_eps = two * etop;
      }
! #endif /* NO_FLOAT_H */
      return double_eps;
  }
  
--- 101,107 ----
        }
        double_eps = two * etop;
      }
! #endif /* UD_HAVE_DBL_EPSILON */
      return double_eps;
  }