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

Re: 980207: RH5 Linux netCDF build problem with gcc-2.8.0: can't find "generic.h"



>From: Charlie Zender <address@hidden>
>Subject: RH5 Linux netCDF build problem with gcc-2.8.0: can't find "generic.h"
>Organization: NCAR/CGD
>Keywords: 199802070521.WAA17247 netCDF RedHat gcc-2.8

Hi Charlie,

> I just tried building the latest netCDF with the egcs-1.0.1 compiler. 
> The build complained that it could not find the header file
> generic.h. generic.h was a part of the gcc compiler through
> gcc-2.7.2, but is no longer as of gcc-2.8.0. I'm hoping you
> will see what's up with installing netCDF with gcc-2.8.0 on
> Linux systems (I'm using Redhat 5.0, which uses glibc2 as the C
> library, by the way). Please let me know if you work out a fix.
> I was able to compile netCDF fine using the gcc-2.7.2 that comes with
> Redhat, but I would like to eventually get rid of gcc-2.7.2 in favor
> of 2.8.0, so it would be great if Unidata could get all their packages
> working out of the box with 2.8.0.

For netCDF 3.4, I've deleted the #include <generic.h> in cxx/netcdf.hh
and inserted the following definitions at about line 49 in
that file:

// macros to glue tokens together to form new names (used to be in generic.h)
#define name2(a,b) a ## b
#define declare(clas,t)        name2(clas,declare)(t)
#define implement(clas,t)      name2(clas,implement)(t)

I think that should fix things for gcc 2.8.0, but we haven't got around
to building and installing it here for testing yet.

Also, we have an alpha test version of netcdf 3.4 that already includes
this change among others, available from

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.4a.tar.Z

in case you'd like to try it.

Thanks for reporting the problem, and please let me know if either of
the above two suggestions doesn't fix it.

--Russ

_____________________________________________________________________

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