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

Re: 950526: netCDF installation problems



>Keywords: 199505261129.AA16887

Hi Steve,

> I recently obtained netcdf and I was going through the installation
> process when I ran across some problems.  First I ran the configure script
> using the defaults. Then I did a "make all" - no problems there.  Then I 
> did a "make test" which produced the following output:
> 
> 
> >making `test' in directory /home/barge/netcdf/netcdf-232pl2/xdr
> 
> >     cc -c -I/usr/include/rpc -DNDEBUG -D_ALL_SOURCE -O xdrtest.c
> >cc -O xdrtest.o -o xdrtest
> >     ./xdrtest > xdrtest_out.new
> >diff xdrtest_out.new testout.sav
> >*** XDR passes formatted test ***
> >cmp test.xdr test_xdr.sav
> >*** XDR passes binary test ***
> 
> >returning to directory /home/barge/netcdf/netcdf-232pl2
> 
> 
> >making `test' in directory /home/barge/netcdf/netcdf-232pl2/libsrc
> 
> >     cc -c   -DNDEBUG -D_ALL_SOURCE -O cdftest.c
> >     ar rcuv libnetcdf.a array.o attr.o cdf.o dim.o file.o iarray.o error.o  
> > globdef.o putget.o putgetg.o sharray.o string.o var.o  xdrposix.o
> >     ranlib libnetcdf.a
> >cc -O cdftest.o libnetcdf.a -o cdftest
> >     ./cdftest > cdftest_out.new
> >ncattget: attribute "TITLE" not found
> >Assertion failed: file cdftest.c, line 393

Although you didn't state what system you are trying to build this on, I
would guess it's an IBM RS6000 running AIX 3.x.  If that's right, then
here's an answer to the problem from our netCDF FAQ file at the URL
http://www.unidata.ucar.edu/packages/netcdf/faq.html


    12. Is there a problem with building netCDF under AIX 3.2? 

        We have observed a problem with the optimizer in the C compiler of
        AIX 3.2. The default for our configure script is to specify
        optimization by using the "-O" compiler flag, but that causes the
        netCDF library to be built incorrectly under AIX 3.2, with the
        symptom that "make test" will fail even though there are no compile
        or link errors when building from source.

        A workaround is to build the netCDF library with CFLAGS="" (or "-g")
        explicitly, by setting the environment variable CFLAGS to "" or "-g"
        before invoking configure, or by using one of the other methods
        suggested in the INSTALL file to prevent the use of the "-O" flag
        for compilation.

        The specific file that is incorrectly compiled with "-O" is
        libsrc/string.c, so another workaround is to recompile that file
        without "-O".

        Delete the ncgen and ncdump executables before rebuilding, so they
        will get rebuilt using the new library.

        NOTE: This is no longer a problem on AIX 4.1.2. 

______________________________________________________________________________

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