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

20021108: Installing netcdf on a Linux box running Red Hat 7.3



>From: "Brian Etherton" <address@hidden>
>Organization: U Miami
>Keywords: 200211081558.gA8Fw5X19089 netCDF build

Brian,

>I am having troubles installing netcdf on my system.  I am running
>linux 7.3.  I worry that I may have the wrong environment settings.  On
>the web page, it lists ones appropriate for an older version of Linux,
>like 2.3 or something.

The example environment variable settings are listed by OS revision
that we ran verifications on.  The version information you are seeing
are basically the results of a 'uname -a'.  The environment variable
definitions shown on the page are valid for 7.3 Linux systems.

>Let me know if there is a web-site which can help me get things going,

The netCDF installation pages should get you going.

>or if you have any advice on how to properly set up my system.  I am not
>a really smart, sys-admin level, linux user, though I am serving as such
>for my machine.  I think I need more 'cookbook' directions to get things
>going.

The steps in building the netCDF are basically:

1) decide which interfaces you want built (e.g., C, Fortran, Fortran 90,
   C++).

2) make sure your system has compilers for the interfaces you want built.
   Redhat 7.3 Linux comes bundled with a C compiler (gcc), a Fortran
   compiler (g77), and a C++ compiler (g++).  If you want to build
   the netCDF library with support for all of these, you should define
   the environment variables listed to match your system.  Here is an
   example that works on our RedHat 7.3 Linux system:

CC=/usr/bin/egcs
CPPFLAGS='-DNDEBUG -Df2cFortran'
CFLAGS=-O
FC=/usr/bin/g77
FFLAGS='-O -Wno-globals'
CXX=/usr/bin/g++

3) after you define these environment variables in your Unix session, you
   should get rid of remnants of previous build attempts.  If the previous
   build attemp created Makefiles, then all you have to do is run
   'make distclean'.  Here is an example:

cd netcdf-3.5.0/src
make distclean

   If your previous build attempt get not get as far as making Makefiles,
   you will need to delete some files created by the configure step:

cd netcdf-3.5.0/src
rm -f config.log config.cache config.status

4) after you have a "clean" environment (step 3) above), you should rerun
   configure and then make:

cd netcdf-3.5.0/src
./configure
make

In 1) - 4) above, the examples assumed you were trying to build netCDF
3.5.0.  If you are building a different version, substitute that version
name in each step.

Tom Yoksas