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

Re: bug in netCDF install (jackets.c)?



> Keywords: 199402030929.AA27928
> From: Gregory D Lewis <address@hidden>

Hi  Greg,

> I have just finished downloading netcdf and am having problems compiling
> it.  I editted CUSTOMIZE to setup CC as gcc -traditional and did a 'setenv
> CPPFLAGS'.  I then ran configure which made no complaints in producing any
> of the makefiles.  However, a 'make all' did produce some problems. The
> file in question was fortran/jackets.c I include the log of the make
> session as well as jackets.c below. Looking at jackets.c it is
> incomplete. I realise it is made from jackets.src using the script in
> fortc. I will have a bit more of a look at this and see if I can generate
> jackets.c manually, although I am loathe to mess with code that I really
> don't have any idea about. Even if that works I still felt I should report
> the bug.  The machine this was being done on is a Sparc10 running SunOS
> 4.1.3 If you would like to see any of the other files that were generated
> by configure then I will be happy to email them to you.  Thanks.

I was unable to reproduce the problem you report, using gcc 2.4.5 on a SunOS
4.1.3 platform.  The warnings you got from gcc may be due to a different
version of gcc, or possibly a different set of patches to SunOS 4.1.3.  In
any case, the warnings you saw about a redefinition of `NULL' redefined are
not serious and can be ignored.

The problem you report with creating the Fortran interface is harder to
explain: 

> ./fortc -L . -O sunos jackets.src > jackets.c
> gcc -traditional -O -c -I../libsrc  -Dconst= -DNO_STRERROR -O jackets.c
> jackets.c:414: unterminated `#if' conditional

It appears that something killed the fortc process that generated jackets.c
or truncated jackets.c, since your jackets.c is identical to the one
generated here up to the last character in your jackets.c.

Here's the output I got from typing "make all" after setting up configure
the same way you did:

    % make all

    making `all' in directory 
/a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2/port

    gcc -traditional -O -c -I.  -Dconst= -DNO_STRERROR -O uddummy.c
    ar rcuv libudport.a uddummy.o
    a - uddummy.o
    ranlib libudport.a

    returning to directory /a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2


    making `all' in directory 
/a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2/xdr


    returning to directory /a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2


    making `all' in directory 
/a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2/libsrc

    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O array.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O attr.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O cdf.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O dim.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O file.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O iarray.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O error.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O globdef.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O putget.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O putgetg.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O sharray.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O string.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O var.c
    gcc -traditional -O -c    -Dconst= -DNO_STRERROR -O xdrposix.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
    a - array.o
    a - attr.o
    a - cdf.o
    a - dim.o
    a - file.o
    a - iarray.o
    a - error.o
    a - globdef.o
    a - putget.o
    a - putgetg.o
    a - sharray.o
    a - string.o
    a - var.o
    a - xdrposix.o
    ranlib libnetcdf.a

    returning to directory /a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2


    making `all' in directory 
/a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2/fortran

    ./fortc -L . -O sunos common.inc > netcdf.inc
    ./fortc -L . -O sunos jackets.src > jackets.c
    gcc -traditional -O -c -I../libsrc  -Dconst= -DNO_STRERROR -O jackets.c
    ar rcuv ../libsrc/libnetcdf.a jackets.o
    a - jackets.o
    ranlib ../libsrc/libnetcdf.a

    returning to directory /a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2


    making `all' in directory 
/a/zero/home/russ/build/sparc-4-gcc/netcdf-2.3.2/ncdump
 ...

and so on, with the make completing successfully with no errors.  I don't
know why jackets.c was truncated on your system.  It takes a long time for
fortc to creates jackets.c from jackets.src.  Is it possible some other user
on your system noticed it was taking a lot of resources and killed the
process before it finished?  You might try again with

   make clean all

to see if jackets.c still gets truncated in the same place.

__________________________________________________________________________
                      
Russ Rew                                              UCAR Unidata Program
address@hidden                                        P.O. Box 3000
(303)497-8645                                 Boulder, Colorado 80307-3000