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

[netCDF #OXB-459057]: Asking for help on netcdf compilation



Hi Jing,

Sorry to have taken so long to respond to your question.
> I am failing to install netCDF4.1.1 on IBM AIX 5.3 system. Enclosed
> is some log files for suggestions.
> 
> (1)
> NWP:/DATA/zhengj/MyTools/netcdf/netcdf-4.1.1 $ ./configure
> --prefix=//DATA/zhengj/MyTools/netcdf/  >& *configure.log*
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> It failed for libcf.
> (detailed info is in: *configure.log and config.log*)

We can't reproduce this problem or determine what caused the configure error
you got in building libcf:

  checking whether we are cross compiling... configure: error: in 
`/DATA/zhengj/MyTools/netcdf /netcdf-4.1.1/libcf':
  configure: error: cannot run C compiled programs.
  If you meant to cross compile, use `--host'.
  See `config.log' for more details.
  configure: error: ./configure failed for libcf

because config.log didn't give any more details except:

  configure:29975: === configuring in libcf 
(/DATA/zhengj/MyTools/netcdf/netcdf-4.1.1/libcf)
  configure:30038: running /bin/sh ./configure --disable-option-checking 
'--prefix=//DATA/zhengj/MyTools/netcdf'  --cache-file=/dev/null --srcdir=.
  configure:30043: error: ./configure failed for libcf

When we run configure on an AIX 5.1 system (the latest we have access to for 
testing),
it completes with no errors.

> (2)When I changed to:
> 
> NWP:/DATA/zhengj/MyTools/netcdf/netcdf-4.1.1 $ ./configure
> --prefix=/DATA/zhengj/MyTools/netcdf FC=xlf90 F77=xlf CC=cc >& *
> configure2.log*
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> NWP:/DATA/zhengj/MyTools/netcdf/netcdf-4.1.1 $ make install >& *install2.log
> *
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> It failed in the "ncgen.h" part.
> (Detailed info is in:* configure2.log, config2.log and  install2.log*)

Here you have overridden the C compiler that the configure script
found in the first try, /usr/vac/bin/xlc, to use CC=cc instead.  This
made your configure succeed, so it looks like progress.

We can reproduce the compile error you encountered when you ran "make
install".  It's a bug caused by leaving in a statement using the C99
comment syntax "//", which is not recognized C89 compilers such as the
AIX cc compiler.  Try deleting the offending statement at line 141 of
in ncgen/ncgen.h:

  //    size_t  unlimitedsize; /* computed unlimited size  */

and rebuilding.

Please let us know whether that works or if you have found another
workaround, such as declaring the C compiler to be C99 compliant.

--Russ

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



Ticket Details
===================
Ticket ID: OXB-459057
Department: Support netCDF
Priority: High
Status: Closed