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

Re: 19990120: Gcc ?



>To: address@hidden
>From: address@hidden (..oo..)
>Subject: Gcc ?
>Organization: Department of Geophysics, University of Chile
>Keywords: 199901201112.EAA12136

Hi Rodrigo,

>    I'm trying to compile netcdf on my computer
>  (Sun Ultra 250, with Solaris 2.6...) 
>    Unfortunally, I have a public domain C and f77 compilers,
>  (GCC and G77)...
>    When I run "configure", appear..:
>   
>   # ./configure
> loading cache ./config.cache
> checking for m4... m4
> checking for xlc... no
> checking for c89... no
> checking for acc... no
> checking for cc... cc
> checking C compiler... configure: error: cc failed to compile test program
> 
>    ...
>    
>    Have I any chance to compile netcdf..?

Yes, but you will have to follow the instructions in the INSTALL file.
In particular, you need to set some environment variables before
running the "configure" script.  For example, to use "gcc", you need
to set the CC environment variable to "gcc".  The output above
indicates this had not been done, so the configure script was probably
trying to use the ancient C compiler in /usr/ucb/cc (which won't work
for netCDF which requires a standard C compiler).

In case you need instructions on how to set environment variables for
various Unix shells, see the section entitled "SETTING ENVIRONMENT
VARIABLES" in the new version of the netCDF INSTALL file at

  http://www.unidata.ucar.edu/packages/netcdf/INSTALL

Also note in the INSTALL file we've tested g77 on is Linux, so I'm not
sure that will work for building the Fortran interface.  But if it
doesn't, you should be able to use "f2c" or just set the FC
environment variable to "" if you don't need the Fortran interface to
netCDF.

After setting your environment variables and before invoking the
"configure" script again, make sure you remove the file "config.cache"
if it exists.

--Russ

_____________________________________________________________________

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