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

970618: building netCDF on an HP-UX <something>



Bill,

>Date: Fri, 18 Jul 1997 14:10:37 -0400 
>From: Bill Hudson <address@hidden>
>Organization: Pennsylvania State University/Applied Research Laboratory
>To: Steve Emmerson <address@hidden>
>Subject: Re: 970618: building netCDF on an HP-UX <something> 
>Keywords: 199707151311.HAA19835

In the above message, you wrote:

> I accdidently wiped out configure so I deleted the netcdf directory and
> uncompressed netcdf-3.3.1.tar.Z again, used the variables below exporting
> them as directed, did configure with no errors and found macros.make with
>  CFLAGS = -O -Aa  
>  and 
>  CXXFLAGS = $(CFLAGS)+O1

I hope there was a space before the "+" above.

> Did the "make > make.log 2>&1" with the following output:
> ------------
> Making `all' in directory /exthd/ftp/pub/gmt/netcdf-3.3/src/libsrc
> 
>         cc -c -O -Aa -I.  -DNDEBUG -D_HPUX_SOURCE attr.c
> /usr/include/sys/stdsyms.h: 10: _INCLUDE_POSIX_SOURCE redefined
> ./ncx.h: 33: undefined preprocessor directive
> attr.c: 2202: undefined preprocessor directive
> attr.c: 2241: undefined preprocessor directive

The undefined preprocessor directive is an "#elif", which is Standard C.

> cc: warning 422: Unknown option "O" ignored.
> cc: warning 422: Unknown option "A" ignored.
> cc: warning 422: Unknown option "a" ignored.
> *** Error code 1

Looks like your C compiler doesn't understand Standard C  -- and can't
be made to.

> 
> Stop.
> *** Error code 1
> 
> Stop.
> *** Error code 1
> 
> Stop.               
> ---------
> Here are the exerpts from the "man cc"
> 
> -------
>       -Amode         Specify the compilation standard to be used by the
>                      compiler.  The mode can be one of the following
>                      letters:
>  
>                         c    Compile in a mode compatible with HP-UX
>                              releases prior to 7.0.  (See The C Programming
>                              Language, First Edition by Kernighan and
>                              Ritchie).  This option is currently the
>                              default.  The default may change in future
>                              releases.
>  
>                         a    Compile under ANSI mode (ANSI programming
>                              language C standard ANS X3.159-1989).  When
>                              compiling under ANSI mode, header files define
>                              only those names specified by the standard.  To
>                              get the same name space as in compatibility
>                              mode (-Ac), define the symbol _HPUX_SOURCE.

Apparently, the above is false.

> 
>       -O             Invoke the optimizer with level 2 optimization.
>                      Equivalent to +O2.
>  
> ----------------
> 
> What next?

You'll have to get a Standard C compiler.  Some possibilities are

    1.  See if the C++ compiler can be turned into a standard C compiler.
        Check the C++ compiler manual page.

    2.  See if another C compiler exists on the system (e.g. "c89",
        "gcc").  You system administrator might be able to help.

    3.  Upgrade your HP-UX C compiler.  See your system administrator.

    4.  Install the GNU C compiler.

Your environment is quite old (both your compilers and your operating
system).  I'd complain loudly to your powers that be.

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