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

Re: 20010221: failure to install netcdf



>From: Christoph Schneider <address@hidden>
>Subject: failure to install netcdf
>Organization: University of Freiburg
>Keywords: 200102211648.f1LGmCL20982 netCDF 3.4 install C++

Hi Cristoph,

> I'm trying to install netcdf on our UNIX-system. Unfortunately without any
> success so far. Maybe you have a hint for me.
> 
> Here is some basic information:
> 
> A) standard output of "uname -a":
> Sun OS main 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-1
> 
> B) contents of file VERSION: 
> 3.4
> 
> C) absolute apthname of all compilers 
> /opt/SUNWspro/bin/
> 
> D) configure.log (see attachment)
> 
> E) config.log (see attachment)
> 
> F) make.log (see attachment
> 
> G) the file 'screen-out-make.log' has everything in that comes to the
> screen when running make. Here there are error messages!
> 
> Looking forward to hearing from you. Any help is highly appreciated.

...

> Making `all' in directory /schnee1/chri/netcdf/netcdf-3.4/src/cxx
> 
> CC -c -O -I../libsrc  -DNDEBUG netcdf.cc
> *** Error code 4
> *** Error code 1
> *** Error code 1

...

> "/usr/include/iso/wchar_iso.h", line 100: Error: Multiple declaration for 
> mbstate_t.
> "/opt/SUNWspro/SC5.0/include/CC/./iosfwd", line 51: Error: The name mbstate_t 
> is ambiguous, std::mbstate_t and std::mbstate_t.
> "/opt/SUNWspro/SC5.0/include/CC/./iosfwd", line 78: Error: The name mbstate_t 
> is ambiguous, std::mbstate_t and std::mbstate_t.
> "/opt/SUNWspro/SC5.0/include/CC/rw/iotraits", line 56: Error: The name 
> mbstate_t is ambiguous, std::mbstate_t and std::mbstate_t.
> 4 Error(s) detected.
> make: Fatal error: Command failed for target `netcdf.o'
> Current working directory /schnee1/chri/netcdf/netcdf-3.4/src/cxx
> make: Fatal error: Command failed for target `subdir_target'
> Current working directory /schnee1/chri/netcdf/netcdf-3.4/src
> make: Fatal error: Command failed for target `cxx/all'

Unfortunately, I'm unable to duplicate the problem with our SunOS 5.8
platform.  Our /opt/SunWspro/bin/CC compiler compiles the netcdf.cc
file without any warnings or errors.  Ours may be a later version

 $ CC -V
 CC: Sun WorkShop 6 2000/04/07 C++ 5.1

but I don't think that's the problem, since it also compiled on a
previous version.  I suspect there is something unusual about the way
your C++ compiler is installed or configured that has nothing to do
with netCDF, since the error messages above refer to multiple
declarations for a typedef, "mbstate_t", that isn't used and doesn't
occur anywhere in the netCDF software.  

To test this, you could see if the following 4-line C++ program
compiles and runs correctly on your system:

#include <string.h>
#include <stdlib.h>
#include <iostream.h>
main() { cout << "Hi\n"; }

This works fine on our SunOS 5.8 system:

 test$ CC -o hi hi.cc
 test$ ./hi
 Hi

If it doesn't work on your system, then you can see if it helps to get
your C++ development environment installed or configured correctly.

Alternatively, if you don't need the netCDF C++ interface, you can
just rebuild without it, since your C and Fortran interfaces appear to
have built without problems.  To do this, just "make clean", "rm
config.cache", and set the CC environment variable to "" (an empty
string) before rerunning the "configure" script, "make all", "make
test", and "make install".  This will result in netcdf libraries for C
or Fortran programs, but no C++ interface library.

--Russ
_____________________________________________________________________

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