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

Re: 970603: make error



>To: address@hidden
>From: address@hidden
>Subject: make error
>Organization: NCSC
>Keywords: 199706031950.NAA28927

Hi Liz,

> Problem when making netcdf.
> 
> flyer% uname -a
> flyer flyer 9.0.1.1 cat.12 CRAY TS

 ...

> CC-403 CC: ERROR File = netcdf.hh, Line = 76
>   Member function function "NcFile::add_att" has already been declared.
>  
>       NcBool add_att( NcToken attname, ncbyte );
>              ^
>  
> CC-403 CC: ERROR File = netcdf.hh, Line = 83
>   Member function function "NcFile::add_att(NcToken, int, const unsigned char
> *)
> "
>           has already been declared.
>       NcBool add_att( NcToken attname, int, const ncbyte* );
>              ^

 ...

> 34 errors detected in the compilation of "netcdf.cc".
> Make: "CC -c -O3  -I../libsrc  -DNDEBUG netcdf.cc": Error code 1
> cmd-2436 make: Stop.
> Make: "cd cxx && \
>     echo "Making \`all' in directory `pwd`" && \
>     echo "" && \
>     make all || exit 1": Error code 1
> Make: "case "CC" in \
>     '') echo 1>&2 "Not making \`cxx/all' because no C++ compiler"; \
>         ;; \
>     *)  subdir=`echo cxx/all | sed 's,/.*,,'`; \
>         target=`echo cxx/all | sed 's,.*/,,'`; \
>         make SUBDIR=$subdir TGET=$target subdir_target; \
>         ;; \
> esac": Error code 1
> cmd-2436 make: Stop.
> 
> The following environment variables were set:
> 
> COLUMNS=80
> LINES=50
> FC=f90
> FFLAGS=-g -i64 -dp -Wp-F
> CFLAGS=-O3
> CC=c89
> CPPFLAGS=-DNDEBUG
> CXX=/opt/ctl/bin/CC

It looks like the only problem is with compiling the C++ interface.  We
have noticed a bug in Cray C++ compilers that causes this.  The only
workaround we have found is described in the INSTALL file:

                        # We don't have the requisite compiler /usr/bin/CC.
    CXXFLAGS='-h char'  # If we did, this option would probably be 
                        # necessary due to a bug in the C++ compiler.

After setting the environment variable CXXFLAGS as above, you will need
to do the following from the top-level src/ directory (where the INSTALL
file resides) to get the C++ interface built:

  1. make clean
  2. rm config.cache
  3. ./configure [whatever args you supplied before]
  4. make all
  5. make test
  6. make install

There's probably a tricky way to modify only the "config.status" file
and avoid remaking everything just to get the C++ interface rebuilt, or
to try invoking "make clean all CXXFLAGS='-h char'" in just the src/cxx
directory, but I'm not sure I'd get it right ...

If you can wait another week or so, we will be releasing netCDF version
3.3.1 with some bug fixes and a few changes that make it perform better
for some uses on Crays in particular (but no different workaround for
the above C++ problem).

--Russ

_____________________________________________________________________

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