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

Re: 950927: netcdf build problem



>Keywords: 199509271858.AA05287

Hi Jeremy,

> Release : netCDF 2.3.2
> System  : Cray J90
> OS      : UNICOS 8.0.3
> 
> 
> Problem:
> 
> The make procedes without problem as far as making the
> fortran library. The m4 preprocessor fails making jackets.c
> with the following error:
> 
>         ./fortc -L . -O unicos jackets.src > jackets.c
> 
> m4:-:529 can't open file
> divert(1)
> 
> 
> m4 is failing at:
> 
> M4__PROTO(`ncpopt',
> `INTEGERSTAR(val)dnl'
> )

The problem is that, at least on some CRAY systems, m4 won't accept the "-"
argument to mean read from standard input. Here are two workarounds that
CRAY sites have found successful:

   1. Manually get around the m4 problem by using a temporary file. In
     netcdf/fortran/fortc, replace the lines

             sed -f $LibDir/fortc1.sed $InFiles |
                 m4 $LibDir/common.m4 $LibDir/$OS.m4 - |
                 sed -f $LibDir/fortc2.sed

     with 

             sed -f $LibDir/fortc1.sed $InFiles > /tmp/fortcin.m4
                 m4 $LibDir/common.m4 $LibDir/$OS.m4 /tmp/fortcin.m4 |
                 sed -f $LibDir/fortc2.sed

     delete the old netcdf/fortran/jackets.c file, and rerun the "make
     all".  (At at least one site, however, reported that this solution didn't
     work, but we didn't get enough details to determine what went wrong.)

or

   2. Build the necessary jackets.c, netcdf.inc, and ftest.f files in the
     netcdf/fortran directory for UNICOS on a different UNIX platform, using
     the commands

        ./fortc -L . -O unicos jackets.src > jackets.c
        ./fortc -L . -O unicos common.inc > netcdf.inc
        ./fortc -L . -O unicos ftest.src > ftest.f

     then copy the resulting files back to the CRAY and run make
     again. Since the modification time on the files should be later
     than on the sources from which they are generated, the fortc that
     invokes the Cray m4 won't be used.

______________________________________________________________________________

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