[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 950202: problem patching c++/Makefile (netcdf 2.3.2pl4)
- Subject: Re: 950202: problem patching c++/Makefile (netcdf 2.3.2pl4)
- Date: Mon, 06 Feb 1995 09:24:40 -0700
> Organization: Dept. of Oceanography, Dalhousie University
Steven,
> > I've appended the resulting c++/Makefile.
>
> Thanks! I've copied it over, changing all the leading blank to tabs
> (stupid cut/paste feature!), and changed CCC = g++.
>
> Unfortunately, I got the following error trying to install:
>
> Skye.Phys.Ocean.Dal.Ca# make
> g++ -c -g -I../libsrc netcdf.cc
> In file included from netcdf.hh:16,
> from netcdf.cc:12:
> ncvalues.hh:20: conflicting types for `unsigned char'
> ../libsrc/netcdf.h:281: previous declaration as `char'
> In file included from netcdf.cc:12:
Sorry I didn't explain that it's necessary to rebuild netCDF from the
`configure' step after the patches.
You need to remake netCDF after applying patches 3 and 4 before trying to
build from the C++ sources. One of the things patch3 does is delete some
typedefs from netcdf/libsrc/netcdf.h.in that should not be there and that
conflict with a C++ typedef:
typedef char ncchar;
typedef char ncbyte;
typedef short ncshort;
typedef float ncfloat;
typedef double ncdouble;
(Only the 'nclong' typedef should remain.)
After applying patch3 that deletes these typedefs (and then patch4), it's
necessary to rebuild from scratch, because `netcdf.h' gets created from
`netcdf.h.in' during the running of the `configure' script. If you have the
`config.status' script lying around from after you ran `configure' it would
suffice to run that, since that will create a new `netcdf.h' from
`netcdf.h.in'.
Then once the `make all' and `make test' steps show you have a working
netCDF library (`make install' is optional at this point), change to the C++
directory and try again.
Unfortunately I haven't been able to install a recent g++ compiler here
because of disk problems with our GNU sources, so it may be a week or so
before I can verify that the patch-level-4 version works with g++ version
2.6.3 or find out what problems remain. I know that the patch-level-4
version works OK with several other C++ compilers on various platforms.
However it looks to me like the other error messages you are seeing result
from the conflicting `typedef char ncbyte' in netcdf.h and `typedef unsigned
char ncbyte' in netcdf.hh that patch 3 followed by a rebuild is supposed to
fix.
>From address@hidden Tue Feb 7 07:14:27 1995
On Mon, 6 Feb 1995, Russ Rew wrote:
> Sorry I didn't explain that it's necessary to rebuild netCDF from the
> `configure' step after the patches.
Thanks Russ! Installed without problem.
I'm having Dan Kelley test it for me now.