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

Re: 980202: netcdf-3.3.1, IRIX 6.4 build problem



>To: address@hidden
>From: Phil Sackinger <address@hidden>
>Subject: netcdf-3.3.1, IRIX 6.4 build problem
>Organization: .
>Keywords: 199802021521.IAA05349
>
>
> Hi,
>
> I attempted to build netcdf-3.3.1 under IRIX 6.4 and ran into a
> problem early in the build, viz., configure went OK, then make
> produced:
>
> ___________________________________________________________________________
>
> Making `all' in directory /usr/home/pasacki/sgi/netcdf-3.3.1/src/libsrc
>
>         c89 -c -O -I.  -DNDEBUG attr.c
>
> "/usr/include/stddef.h", line 37: error(1084): invalid combination of type
>           specifiers
>   typedef int   ptrdiff_t;
>                 ^
>
> "/usr/include/stddef.h", line 46: warning(1213): duplicate specifier in
>           declaration
>   typedef unsigned int  size_t;
>                         ^
>
> "/usr/include/stddef.h", line 46: warning(1349): declaration requires a
>           typedef name
>   typedef unsigned int  size_t;
>                               ^
>
> "/usr/include/sys/types.h", line 206: error(1084): invalid combination of
type
>           specifiers
>   typedef int    ssize_t;
>                  ^
>
> 2 errors detected in the compilation of "attr.c".
> *** Error code 2 (bu21)
> *** Error code 1 (bu21)
> *** Error code 1 (bu21)
> ____________________________________________________________________________
>
> I've built various versions of netcdf under Solaris without any
> problems, but I'm not as familiar with IRIX. Maybe I'm overlooking
> something obvious.
>
> FWIW, "uname -a" gives
>
> IRIX64 discovery 6.4 02121744 IP27
>
> and "cc -version"
> MIPSpro Compilers: Version 7.20
>
> If you want the config.log or other tests run, please let me know.
>
> BTW, thanks for creating, distributing, maintaining and improving
> netCDF - it's a genuine service to the scientific computing community!
>
> Thanks,

It looks to me like the configuration is defining the standard C types
'ptrdiff_t', 'size_t', and 'ssize_t' when it doesn't need to.
Was there a 'config.cache' file left over from a previous build or
build attempt when you ran 'configure'?

Do a 'make distclean' and try running 'configure' again.
If you still have the problem, send us the config.log and libsrc/ncconfig.h.

There is also a slight chance that your compiler is installed incorrectly,
but that would show up on other code as well. If this were the case,
the following standalone code probably would exhibit the problem:

==== snip & compile ====

#include <sys/types.h>
#include <stddef.h>

long
func(void)
{
        size_t p[10];
        ptrdiff_t d = &p[9] - &p[0];
        return (long) d;
}

=====

-glenn