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

Re: 19990309: Building netCDF on HP-UX 10.20



Brett,

> cc: address@hidden
> From: "Brett E. McDonald" <address@hidden>
> Subject: Building netCDF
> Organization: NOAA
> Keywords: 199903091419.HAA04342 netCDF HP-UX

In the above message, you wrote:

> I am trying to compile netCDF on my workstation and have run into a
> problem in the configure script.
> 
> I have an HP B180L running HPUX 10.20
...
> creating cache ./config.cache
> checking for m4... m4
> checking user-defined C compiler "/opt/ansic/bin/cc"
> checking C compiler... works
> checking how to make dependencies... false
> checking for /usr/ncep/bin/c++... /usr/ncep/bin/c++
> checking C++ compiler "/usr/ncep/bin/c++"... works
> checking how to run the C preprocessor... /opt/ansic/bin/cc -E
> checking user-defined Fortran compiler "/opt/fortran/bin/fort77"... works
> checking for Fortran .F compiler... 
> checking if Fortran compiler handles *.F files... yes
> checking for C-equivalent to Fortran routine "SUB"... sub
> checking for Fortran "byte"... yes
> checking for Fortran "integer*2"... yes
> checking if Fortran "byte" is C "signed char"... 
...
> X-Content-Name: config.log
> 
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> configure:1020: /opt/ansic/bin/cc -c  -D_HPUX_SOURCE conftest.c 1>&5
> configure:1153: /usr/ncep/bin/c++ -c  -D_HPUX_SOURCE conftest.C 1>&5
> configure:1220: /opt/ansic/bin/cc -E -D_HPUX_SOURCE conftest.c >/dev/null 
> 2>conftest.out
> configure:1319: /opt/fortran/bin/fort77 -c -w conftest.f
> conftest.f:
>    MAIN:
> configure:1422: /opt/fortran/bin/fort77 -o conftest -w conftest.F  -lU77
> /var/tmp/fcpFAAa26650:
>    MAIN:
> configure:1463: /opt/fortran/bin/fort77 -c -w conftest.f
> conftest.f:
>    MAIN:
> configure:1498: /opt/fortran/bin/fort77 -c -w conftest.f
> conftest.f:
>    sub:
> configure:1521: /opt/fortran/bin/fort77 -c -w conftest.f
> conftest.f:
>    sub:
> configure:1555: /opt/ansic/bin/cc -c -D_HPUX_SOURCE  conftest.c
> cc: "conftest.c", line 2: warning 5: "signed" will become a keyword.
> cc: "conftest.c", line 2: error 1000: Unexpected symbol: "signed".

The above indicates that the C compiler "/opt/ansic/bin/cc" couldn't
compile the following code (file "conftest.c"):

    void sub(values)
        signed char values[4];
    {
        exit(values[1] != -2 || values[2] != -3);
    }

The compiler choked on the "signed" keyword above.  This indicates
that the compiler is not a Standard C compiler (regardless of what the
pathname connotes).  The netCDF package is designed to be compiled with
a Standard C compiler.

Unfortunately, we no longer have an HP-UX B.10.20 system, so I can't
duplicate your problem to find a workaround.  (The /opt/ansic/bin/cc"
compiler that we have on our HP-UX B.11.00 system successfully compiled
the above code.)

You might try one of the following:

    1.  See if /opt/ansic/bin/cc has an option that will cause "signed"
        to be accepted and set that option in the CFLAGS environment
        variable.

    2.  Use the set of environment variables indicated in the INSTALL
        file for HP-UX B.10.20 (i.e. don't use /opt/ansic/bin/cc).

    3.  Use /opt/ansic/bin/c89 instead of /opt/ansic/bin/cc.

Each of the above options will require you to execute steps 2 through 6
near the end of the INSTALL file.

Please let me know if this helps.

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