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

Re: 980212: Failure of make when building netcdf on a UNIX 10.2 platform



>To: address@hidden (IPM Return requested)
>From: Greg Dial <address@hidden>
>Subject: Failure of make when building netcdf on a UNIX 10.2 platform
>Organization: NOAA
>Keywords: 199802121503.IAA15047 netCDF HP-UX 10.2 C++ gnu

Hi Greg,

>      I am trying to build netcdf on an HP-UNIX 10.2 platform. Make runs 
>      O.K. when it builds the basic netCDF library, but has problems when 
>      building the C++ interface. I am using HP's version of C, along with 
>      the GNU C++ compiler. 
>      
>      I have attatched some files to aid in diagnosing this problem. Any 
>      suggestions will be appreciated.
 ...
>       c++ -c -O  -I../libsrc   -D_HPUX_SOURCE -DNDEBUG nctst.cc
> In file included from 
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/sys/param.h:29,
>                  from /usr/include/limits.h:313,
>                  from 
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/syslimits.h:6,
>                  from 
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/limits.h:11,
>                  from ncvalues.hh:20,
>                  from netcdf.hh:16,
>                  from nctst.cc:3:
> /usr/include/sys/time.h:458: warning: `FD_SET' redefined
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/sys/types.h:256: 
> warning: this is the location of the previous definition
> /usr/include/sys/time.h:467: warning: `FD_CLR' redefined
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/sys/types.h:257: 
> warning: this is the location of the previous definition
> /usr/include/sys/time.h:471: warning: `FD_ZERO' redefined
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/sys/types.h:261: 
> warning: this is the location of the previous definition
> /usr/include/sys/time.h:495: warning: `FD_ISSET' redefined
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/sys/types.h:258: 
> warning: this is the location of the previous definition
> In file included from 
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/sys/param.h:29,
>                  from /usr/include/limits.h:313,
>                  from 
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/syslimits.h:6,
>                  from 
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/limits.h:11,
>                  from ncvalues.hh:20,
>                  from netcdf.hh:16,
>                  from nctst.cc:3:
> /usr/include/sys/time.h:447: conflicting types for `struct __fd_set'
> /usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/include/sys/types.h:254: 
> previous declaration as `struct fd_set'
> *** Error exit code 1

I'm having trouble duplicating the problem.  It may be a problem with
how the GNU C++ compiler is configured on your system.  On our system,
when I set the environment variable CXX=c++ before running the configure
script so it gets c++ from /usr/local/gnu/bin/c++, it seems to build
fine, with none of the error messages you are seeing:

    ...
    Making `all' in directory /home/russ/netcdf-3/hpux_10.20-hp9000/src/cxx

            c++ -c -O  -I../libsrc  -D_HPUX_SOURCE netcdf.cc
            c++ -c -O  -I../libsrc  -D_HPUX_SOURCE ncvalues.cc
            ar cru libnetcdf_c++.a netcdf.o ncvalues.o
            ranlib libnetcdf_c++.a
            c++ -c -O  -I../libsrc  -D_HPUX_SOURCE nctst.cc
            c++ -o nctst -I../libsrc  -D_HPUX_SOURCE -O   nctst.o 
libnetcdf_c++.a../libsrc -lnetcdf 

We're using version 2.7.2.2 of GNU c++ on HP-UX 10.20; we haven't
installed the new 2.8 version yet.

The fact that you get messages about conflicts from include files in a
directory with ".../hppa1.1-hp-hpux9.01/2.6.3/..." in the path
(presumably meaning you are using GNU c++ version 2.6.3 built for an
HP-UX 9.01 system) makes me think it may be necessary to rebuild GNU c++
for HP-UX 10 in order to get things to work right.  Is there a test you
can run to see if the GNU C++ you have installed works as intended, for
example compiling and running the tests for libg++?  Alternatively, you
can break new ground and try installing the new 2.8 version of g++ and
let us know how it works for the netCDF 3.3.1 C++ interface.

As another possibility, you could try the test version of netCDF 3.4,
available as <ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.4a.tar.Z>
and let us know if that improves things.  There have been a few fixes
for C++ problems, but nothing having to do with the errors from the
compiler you are seeing, so I doubt this will help.  But I've verified
that the 3.4alpha version also compiles fine on our HP-UX 10.20 platform
using the GNU c++ 2.7.2.2 compiler.

--Russ

_____________________________________________________________________

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