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

Re: 980218: installation instructions for netcdf



>To: address@hidden
>cc: address@hidden
>From: address@hidden
>Subject: installation instructions for netcdf 
>Organization: Max-Planck Institute for Chemistry
>Keywords: 199802181413.HAA06676

Hi Jamie,

> My goal is to use the "ncdump -h" program to look the metadata
> information in some netcdf files containing the Da Silva and Young
> oceanographic atlas.
> 
> To use the ncdump command, I have trying to install the netcdf program
> package on our UNIX system.  I am having problems and neither I nor
> informed computer people here can find a solution.
> 
> The problem starts when I use the "make" command given in the INSTALL 
> instructions.  This program stops with the following output:
> 
> ncvalues.hh:13: generic.h: No such file or directory
> ncvalues.hh:14: iostream.h: No such file or directory
> ncvalues.hh:18: strstream.h: No such file or directory
> *** Exit 1
 ...
> What are these files generic.h, iostream.h, or strstream.h and where
> to we get them?

This means C++ compiler is unable to locate some standard include files
that should be installed with any C++ compilation system (generic.h,
iostream.h strstream.h).  From the above, I would guess that your C++
compiler may not be able to compile and link the following standard
2-line program:

#include <iostream.h>
main() {cout << "Hello, world\n"; }

You can either find out what's needed to get the C++ compiler to compile
and link standard C++ programs or just ignore the C++ interface, since
the FORTRAN and C interfaces work fine without the C++ interface, and
the ncdump and ncgen utilities are also independent of the C++ interface.

If you want to rebuild without a C++ interface, run "make clean", remove
the file "config.cache", set the environment variable CXX="" before
running the "configure" script, and proceed with "make all", "make
test", and "make install", if desired.

But you can also just use what you have, since you only needed the
ncdump executable.

> (At this stage, the "ncdump" program appears in the directory, but
> when I try  
> and use it, I get the following result:
> 
> minerva.mpch-mainz.mpg.de> ncdump
> ncdump: Permission denied.)

I think the "ncdump" that appears in the netcdf-3.3.1/src/ directory is
another directory, and the ncdump executable is actually in that
directory as netcdf-3.3.1/src/ncdump/ncdump.  You can test this by
changing to that ncdump subdirectory and running "make test" to make
sure the ncdump program there passes some simple tests.

> The second part of the INSTALL instructions that I did not understand
> concerned the environment variables.  For our machine, these are:
> 
> OSF1 ernie V4.0 564 alpha
>     CPPFLAGS=
>     CC=/bin/c89
>     CFLAGS=-g
>     FC=/bin/f77
>     FFLAGS=-g
>     CXX=/bin/cxx
> 
> Where are these variables supposed to be set? I used the set command
> to individually set the parameters at the UNIX prompt, but nothing
> happened.  Are the variables supposed to be set in the .cshrc or
> .login files?

Sorry this is not clearer, these are supposed to be set in the
environment of the configure shell script, before running it.  This is
done in different ways depending on which shell (csh, sh, ksh, bash)
you are running.  For csh, you can just use something like this:

 % setenv CPPFLAGS ""
 % setenv CC /bin/c89
 % setenv CFLAGS -g
  ...

and so on, then run the configure script, which will inherit these
environment variables.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu