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

Re: 980305: netCDF to run on MkLinux



>To: address@hidden
>From: address@hidden (dale,amy, erik and michael walker)
>Subject: netCDF
>Organization: 3rc
>Keywords: 199803052238.PAA09090

Hi Dale,

> I am trying to get netCDF to run on MkLinux (PPC version of Linux) on my
> powermac.
> 
> I am a novice at working with Unix.
> 
> I read about test installs:
> 
> You can use GNU make to overcome this, or simply manually include the
> specified files after running configure.
> 
> If you can't run "configure", you will need to create libsrc/ncconfig.h
> and fortran/nfconfig.inc. Start with libsrc/ncconfig.in and
> fortran/nfconfig.in and set the defines as appropriate for your
> system.
> 
> 
> DOES THIS MEAN I MAKE MY OWN TEXT FILE AND NAME IT THIS.
> 
> then the below information would be inthe files?
> 
> 
> Linux sunshine 2.0.27 #1 Sat Dec 21 23:44:11 EST 1996 i586
>     CPPFLAGS=-Df2cFortran       # "-Df2cFortran" is necessary if the FORTRAN
>                                 # "compiler" is fort77(1).
>     CC=/usr/bin/cc              # actually gcc version 2.7.2.1
>     CFLAGS=-g
>     FC=/usr/bin/fort77          # actually an f2c(1)-using script
>     FFLAGS='-g -Nx400 -w'       # "-Nx400" allows fortran/netcdf.inc to
>                                 # have many EXTERNAL statements
>     CXX=/usr/bin/c++            # actually gcc version 2.7.2.1

I don't think you need to bother with putting the above in a file, if
you can run the "configure" script that's in the top-level src/ directory
(the same one containing the INSTALL) file.  How you set the values of
the environment variables like CC, CFLAGS, ..., CXX depends on what
"shell" you are using.  If you are using "csh" (usually gives a "%"
prompt), you need to do something like this (where I include the
prompts), assuming you are in the top-level netcdf src/ directory:

 % setenv CPPFLAGS -Df2cFortran
 % setenv CC /usr/bin/cc
 % setenv CFLAGS -g
 % setenv FC /usr/bin/fort77
 % setenv FFLAGS '-g -Nx400 -w'
 % setenv CXX /usr/bin/c++
 % ./configure
   [... expect output from configure]

If you are using "ksh" or "sh" or "bash" for your shell (usually gives a
"$" prompt), you need to do something like this instead (where I again
include the prompts):

 $ export CPPFLAGS=-Df2cFortran
 $ export CC=/usr/bin/cc
 $ export CFLAGS=-g
 $ export FC=/usr/bin/fort77
 $ export FFLAGS='-g -Nx400 -w'
 $ export CXX=/usr/bin/c++
 $ ./configure
   [... expect output from configure]

If this seems to work, it will generate some files so you can just
invoke

 make all
 make test
 make install

(where I have left off the shell prompts, since how you invoke make
doesn't depend on what shell you are using).

I hope this helps.

--Russ

_____________________________________________________________________

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