[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 19990304: netCDF 3.4 SunOS 5.5/Sparc configure problem: conftest.c
- Subject: Re: 19990304: netCDF 3.4 SunOS 5.5/Sparc configure problem: conftest.c
- Date: Thu, 04 Mar 1999 09:48:16 -0700
Dale,
> To: address@hidden
> From: Dale Roblin <address@hidden>
> Subject: error mesasges
> Organization: .
> Keywords: 199903041036.DAA29741
In the above message, you wrote:
> I have included items A through E and my current environment variables:
>
> A. dale@gps1>uname -a
> SunOS gps1 5.5 Generic sun4m sparc SUNW,SPARCstation-5
>
> B. dale@gps1>cat VERSION
> 3.4
>
> C. dale@gps1>type CC
> CC is /usr/bin/CC
> dale@gps1>type f77
> f77 is /usr/bin/f77
>
> D. dale@gps1>./configure --prefix=/opt >&! configure.log
> dale@gps1>cat configure.log
> creating cache ./config.cache
> checking for m4... m4
> checking user-defined C compiler "/opt/SUNWspro/bin/CC"
> checking C compiler... works
> checking how to make dependencies... cc -xM
> checking for /opt/SUNWspro/bin/CC... /opt/SUNWspro/bin/CC
> checking C++ compiler "/opt/SUNWspro/bin/CC"... works
> checking how to run the C preprocessor... /opt/SUNWspro/bin/CC
> - -E
> checking user-defined Fortran compiler
> "/opt/SUNWspro/bin/f77"... 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"... configure:
> error: Could not compile conftest.c
>
> E. dale@gps1>cat config.log
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a
> mistake.
>
> configure:1020: /opt/SUNWspro/bin/CC -c -g -DNDEBUG conftest.c
> 1>&5
> configure:1153: /opt/SUNWspro/bin/CC -c -DNDEBUG conftest.C
> 1>&5
> configure:1220: /opt/SUNWspro/bin/CC -E -DNDEBUG conftest.c
> >/dev/null 2>conftest.out
> configure:1319: /opt/SUNWspro/bin/f77 -c -g -w conftest.f
> conftest.f:
> MAIN:
> configure:1422: /opt/SUNWspro/bin/f77 -o conftest -g -w
> conftest.F
> /tmp/cpp.17924.0.f:
> MAIN:
> configure:1463: /opt/SUNWspro/bin/f77 -c -g -w conftest.f
> conftest.f:
> MAIN:
> configure:1498: /opt/SUNWspro/bin/f77 -c -g -w conftest.f
> conftest.f:
> sub:
> configure:1521: /opt/SUNWspro/bin/f77 -c -g -w conftest.f
> conftest.f:
> sub:
> configure:1555: /opt/SUNWspro/bin/CC -c -DNDEBUG -g conftest.c
> "conftest.c", line 1: Error: values is not defined.
> "conftest.c", line 4: Error: The function exit must have a
> prototype.
> "conftest.c", line 5: Error: "}" expected instead of EOF.
> 3 Error(s) detected.
I believe your problem is due to the environment variable CC being set
to /opt/SUNWspro/bin/CC -- which is a C++ compiler -- rather that to, for
example, /opt/SUNWspro/bin/c89 -- which is a C compiler. This caused
the configure script to use the C++ compiler as the C compiler -- with
the resulting consequences.
Please try steps 2 through 9 near the end of the INSTALL file. At step
5, set your environment variables as follows:
CC /opt/SUNWspro/bin/c89
CPPFLAGS -DNDEBUG
CFLAGS -O
FC /opt/SUNWspro/bin/f77
FFLAGS "-O -erroff=WDECL_LOCAL_NOTUSED"
CXX /opt/SUNWspro/bin/CC
Please let me know if this helps.
--------
Steve Emmerson <http://www.unidata.ucar.edu>