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

Re: netCDF 2.4.2



Hi Dick!

> I think that 2.4.2 is ready to go.  I built it on shavano first,
> with absolutely no problem, including the tests.  Then, due to 
> a sys-admin request here, I built the products on echo, which 
> is a small Y-MP.  The C++ part of "make all" failed; I think this
> is due to the configure script finding C++ on echo; since C++ is
> not on shavano, there was no problem there.
> 
> On echo, if I set environmental variable CXX equal to the null
> string, then everything works as expected.

Great, that was the right thing to do.  I think that the problem with the
netcdf C++ interface on echo is a Cray C++ compiler problem, for which I
know of no easy workaround.  I've appended a more detailed description that
I sent to Jeff Kuehn some months ago, when I first encountered it.  I
assume he reported the problem to Cray, and that it will be fixed in a
subsequent C++ release.

> I'm hoping to install soon, and I wanted to know if you think 
> it's OK to do so.  I'm appending the logfile from "make all"
> for 2.4.2 on echo in case you want to see it.

Yes, it looks fine.

--Russ


I've looked into the C++ errors revealed by trying to compile the netCDF 2.4
C++ interface on the Cfront-based Cray compiler on echo.ucar.edu and
concluded that this is a compiler problem that we can't easily work around.

I've isolated the problem to a small demonstration program that demonstrates
a failure to distinguish plain char, signed char, and unsigned char as three
distinct types for overloading function signatures:

--------------------------------------
#include <iostream.h>

class X {
public:
    X() {}
    void f(char c)           {cout << "char "          << c << "\n";}
    void f(signed char s)    {cout << "signed char "   << s << "\n";}
    void f(unsigned char u)  {cout << "unsigned char " << u << "\n";}
};

int
main()
{
    X x;
    char c = 'c';
    signed char s = -13;
    unsigned char u = 'u';

    x.f(c);
    x.f(s);
    x.f(u);

    return 0;
}
--------------------------------------

The above program conforms to the proposed C++ standard, as far as I have
been able to determine (see, for example, chapters 3 and 4 of the draft
standard at <URL http://www.csci.csusb.edu/dick/c%2b%2bstd/september/>).
It compiles with no errors or warnings and runs fine on the following
platform/compiler combinations:

    SunOS 5.4 or SunOS 4.1.4, CC 3.0.1:
    SunOS 5.4, g++ 2.6.3:
    IRIX 6.1, CC
    OSF1 3.2, g++ 2.7.2:
    AIX 4.1.4, xlC:

It also runs fine on the following platform, though it produces a warning:

    IRIX 5.3, CC
        "chars.cc", line 7: warning(3672): Mangling of signed character does
                            not match cfront name mangling.
              void f(signed char s)    {cout << "signed char "   << s << "\n";}
                   ^
However, it fails to compile on echo.ucar.edu.

--Russ