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

[netCDF #FQF-896806]: request for help in building netcdf



> Hi,
> 
> I am trying to port CESM on Blugene/L IBM computer. I have to compile netCDF
> and the NetCDF must be built with the same Fortran compiler as CESM. I set the
> following variables:
> 
> setenv CC blrts_xlc
> setenv CPPFLAGS '-D_POSIX_SOURCE -DNDEBUG -D_ALL_SOURCE -DIBMR2Fortran'
> setenv FC blrts_xlf
> setenv F90 blrts_xlf90
> setenv CXX blrts_xlC
> setenv CFLAGS '-qarch=440'
> setenv FFLAGS '-O2 -qarch=440'
> setenv F90FLAGS '$FFLAGS -qsuffix=f=f90'
> 
> I got the error message below:
> 
> checking whether byte ordering is bigendian... universal
> checking size of short... 0
> checking size of int... 0
> checking size of long... 0
> checking size of float... 0
> checking size of double... 0
> checking size of off_t... configure: error: cannot compute sizeof (off_t)
> See `config.log' for more details.
> 
> Also, Attached the config.log file for your reference.
> 
> I appreciate any help to resolve the issue.
> 
> Thanks.
> 

Howdy DEVARAJU!

Are you trying to cross-compile netCDF? That is, is the platform you are 
running on different from the target platform?

If you cannot run programs on the platform, but can compile for it, you can run 
configure with --disable-fortran-type-check, but then you should look in the 
configure file and make sure the defaults will work on your fortran compiler:
      $as_echo "#define NCBYTE_T byte" >>confdefs.h
      $as_echo "#define NCSHORT_T integer*2" >>confdefs.h
      $as_echo "#define NF_INT1_T byte" >>confdefs.h
      $as_echo "#define NF_INT2_T integer*2" >>confdefs.h
$as_echo "#define NF_INT1_IS_C_SIGNED_CHAR 1" >>confdefs.h
$as_echo "#define NF_INT2_IS_C_SHORT 1" >>confdefs.h
$as_echo "#define NF_INT_IS_C_INT 1" >>confdefs.h
$as_echo "#define NF_REAL_IS_C_FLOAT 1" >>confdefs.h
$as_echo "#define NF_DOUBLEPRECISION_IS_C_DOUBLE 1" >>confdefs.h

Thanks,

Ed

Ticket Details
===================
Ticket ID: FQF-896806
Department: Support netCDF
Priority: High
Status: Closed