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

Re: 20000207: Installing gmt



>To: address@hidden
>From: "Dr. Mehdi Rezapour" <address@hidden>
>Subject: Installing gmt
>Organization: .
>Keywords: 200002070625.XAA20368

Hi Dr. Rezapour,

> I have some problems in installing GMT3.1. I have got the following files
>
> GMT_doc.tar
> GMT_full.tar
> GMT_high.tar
> GMT_lib.tar
> GMT_progs.tar
> GMT_suppl.tar
> netcdf-3.4.tar
>
> The system which I am using is (SunOS 5.6 and Solaris 2.6).
> Unfortunately there are not cc and fortran compiler on system. I have 
> installed gcc myself and (c++ gcc g++) have been created in /opt/SNUgcc/bin
> directory but no cc. I got only executable file of cc and f77 from a site and 
> put
> in directory /opt/SUNWspro/bin . Also I linked these files by using "ln" 
> command 
> in directory of /usr/ucb as "ln -s gcc/SNUgcc/bin/gcc gcc" etc.
> After extracting files from tar files, when I run ./configure
> for installing netcdf-3.4 I got the following massages
> ---------
> geophys% ./configure
> loading cache .configure.cache
> checking for m4... (cached) m4
> checking for xlc... (cached) cc
> checking c compiler... configure: error: cc failed to compile test program

Installing cc and f77 requires other files than just the cc and f77
executables, for example the run-time libraries, and the assembler (I
think that's what "acomp" is).  The configure script in "checking c
compiler" is just trying to compile and run a very simple C program.
If it cannot do this, it produces the error message above.

Rather than trying to use "cc" and "f77" by just copying some files
from a system that has them, I suggest you use gcc, if it works for
compiling C programs.  If you need Fortran for GMT (netCDF doesn't
really need a Fortran compiler to just build the C interface), you
might be able to use "fort77" for the Fortran compiler (which is just
a script that uses the f2c program that translates Fortran to C).

To use "gcc" for building netCDF, just run "make clean" in the netCDF
source directory, then "rm config.cache" if that file is still there.
set the environment variable "CC" to "gcc" and set "FC" to ""
(nothing) to indicate you don't need the Fortran interface to netCDF
built.  Then just run the "configure" script, "make all", "make test",
and finally "make install" if needed.  I just tested this with version
2.8.1 of gcc on a Solaris 2.7 system, and it worked fine.

I can't answer questions about GMT; if it requires the Fortran
interface for netCDF, you will need to get f2c (which I believe
includes the fort77 script) or maybe g77 will work.

> ... Where can I get the executable gmt files.

I'm not sure, maybe the GMT support staff can help with that.

--Russ

_____________________________________________________________________

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