This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>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