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

20021111: NetCDF V3.5.1-beta(5) Fortran 90 compile errors: HP-UX 11



Matt,

> To: address@hidden
> From: Matt Huddleston <address@hidden>
> Subject: Fortran 90, NetCDF V3.5.1-beta(5) compile errors
> Organization: Met Office

The above message contained the following:

> I'm having trouble installing a fortran 90 version of NetCDF on both
> HPUX-11 and a Cray T3e - the errors are different so I will send them
> seperately.
> 
> Here is the compile error for the HP-UX 11 system - please advise!
> 
> Best regards,
> 
> Matt Huddleston
...

> --------- Configure script -----------------
> creating cache ./config.cache
> checking for top-level source-directory
/temp/hc1700/hadhh/netcdf-3.5.1-beta5/src
> checking for m4 preprocessor
> checking for m4... m4
> checking m4 flags... -B10000
> checking C compiler "/opt/softbench/bin/cc"... works
> checking how to make dependencies... false
> checking for /usr/bin/CC... /usr/bin/CC
> checking C++ compiler "/usr/bin/CC"... configure: warning: /usr/bin/CC
> failed on test program
> configure: warning: Could not find working C++ compiler
> configure: warning: Setting CXX to the empty string
> configure: warning: The C++ interface will not be built

This isn't related to your Fortran-90 problem, but if you want to build
the C++ interface, then copy the "ncconfig.in" attachment into the
"cxx/" subdirectory and re-execute the configure script.

...
> make[2]: Entering directory
> `/temp/hc1700/hadhh/netcdf-3.5.1-beta5/src/f90'
> /opt/system/bin/f90 -c -w typeSizes.f90
> /opt/system/bin/f90 -c -w netcdf.f90
> Error: netcdf_attributes.f90, line 95: Inconsistent structure for arg 6
> in call to NF_PUT_ATT_INT1
> Error: netcdf_attributes.f90, line 113: Inconsistent structure for arg 4
> in call to NF_GET_ATT_INT1
> Error: netcdf_attributes.f90, line 131: Inconsistent structure for arg 6
> in call to NF_PUT_ATT_INT2
...

The above "errors" are expected and are ignorable. Apparently it's
necessary to specify an apppriate option in the F90FLAGS environment
prior to executing the configure script in order to cause your
Fortran-90 compiler to ignore such "errors". Unfortunately, our HP-UX 11
system doesn't have a Fortran-90 compiler, so I can't tell you what that
option is. At least one Fortran-90 compiler I know uses the "-w" option
to ignore such "errors". Check the documentation on your Fortran-90
compiler.

When you're ready to retry, then do the following:

    1.  Go to the top-level source directory.

    2.  Perform steps 3 through 5 described near the end of the file
        INSTALL.html.

    3.  Ensure that the environment variable F90FLAGS contains the
        option that will cause the compiler to ignore "errors" like
        the above.

    4.  Perform steps 6 through 9 described near the end of the file
        INSTALL.html.

Please let me know if this helps.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>

#ifndef _NCCONFIG_HH_
#define _NCCONFIG_HH_

/* Define if the C++ compiler doesn't support "#include <iostream>". */
#undef NON_STANDARD_CXX_INCLUDE

#endif /* !_NCCONFIG_HH_ */