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

Re: 19990430: Trouble w/netcdf on HPUX



>To: address@hidden
>From: Stephen Leroy <address@hidden>
>Subject: Trouble w/netcdf on HPUX
>Organization: Jet Propulsion Laboratory
>Keywords: 199904301905.NAA17715

Hi Stephan,

> I'm trying to make libnetcdf.a on an HP running HPUX. It doesn't work.
> Specifically, it hangs up at the line
> 
> #include <alloca.h>
> 
> which is line 34 in onstack.h in the directory libsrc. That header
> file, alloca.h, cannot be found. Sure enough, I cannot find it in
> /usr/include on my system. (Incidentally, it is using the "c89"
> compiler.) Any suggestions?

I assume you're using netCDF version 3.4, the latest released version.
In the INSTALL file are instructions for building netCDF on HPUX
systems.  In particular, it recommends setting some environment
variables before you run the configure script:

  CC=/bin/c89
  CPPFLAGS='-DNDEBUG -D_HPUX_SOURCE -w' # "-w" suppresses ignorable warnings
  CFLAGS=-O
  FC=/opt/fortran/bin/fort77            # might be /usr/bin/fort77 instead
  FFLAGS='-O -w'
  CXX=/usr/bin/CC

I think the "-D_HPUX_SOURCE" will fix the problem you are seeing.  How
you set the environment variables differs depending on what shell you
are using.  See

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

in case you need an explanation of how to set the environment
variables.  Make sure you delete the file "config.cache", if it
exists, and "make clean".  Then rerun the configure script.  This will
set up all your Makefiles, so you should just need to invoke "make
all", "make test", and "make install".

If there are still problems, please send us the information listed in
the "REPORTING PROBLEMS" section at the end of the INSTALL file.  Thanks.

--Russ

_____________________________________________________________________

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