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

20020405: install netcdf on Solaris 5.8 using c89, f90, and g++ (cont.)



>From: "Limin Zhao" <address@hidden>
>Organization: NOAA NESDIS/ORA
>Keywords: 200204022010.g32KAAa20458 netCDF SUNWspro 

Limin,

First, I apologize for not getting back to you on this sooner.

>Thanks very much for your help. I have followed your suggestions 
>carefully, here is the preogress I made so far.
>
>(1) Since we do not have SUN C/C++, so we have to use gcc/g++.

OK.

>(2) After following your suggestions and removed all old files by 
>    doing
> 
>    make distclean
>   
>    and also make sure all enviroment variables are set up as what I 
>    want I was able to pass the ./configure, but have the following 
>    messages
>
>    when I do 
>
>    make > make.log
>
>-------------------------make > make.log
>In file included from netcdf.cpp:12:
>netcdfcpp.h:157: friend declaration requires class-key, i.e. `friend 
>class 
>   NcFile'
>netcdfcpp.h:360: friend declaration requires class-key, i.e. `friend 
>class 
>   NcFile'
>netcdfcpp.h:391: friend declaration requires class-key, i.e. `friend 
>class 
>   NcFile'
>make: Fatal error: Command failed for target `netcdf.o'
>Current working 
>directory /net/orbit18i/disk5/pub/lzhao/1dvar/cmis_sun/cmis1001/lib/
>netcdf/tar/netcdf-3.5.0/src/cxx
>make: Fatal error: Command failed for target `subdir_target'
>---------------------

OK, this is a known bug that is fixed in the netcdf-3.5.1 beta
distribution.  You can make the changes to the 3.5 file yourself by
editing netcdfcpp.h and changing the lines that are causing the
problems.  The fix is exactly as the make log lines indicate: replace
the friend declaration with 'friend class'.  

For example:

at line 157, change:

    friend NcFile;

to:

    friend class NcFile;


Don't forget to do the same thing for lines 360 and 391 in netcdfcpp.h.

After doing this, you should be able to continue your make.

>I'm sending you the confgiure.log and enviroment variables.

I don't think that these are necessary, so I am deleting them.

Tom