[ncl-install] Solaris 86 hproto.h", line 402: syntax

Mary Haley haley at ucar.edu
Wed Mar 18 14:23:57 MDT 2009


Hi Wolfgang,

These errors are coming from an HDF4.2r4 include file, and not NCAR
Graphics:

  "/opt/HDF4.2r4/include/hproto.h", line 402: syntax error before or at: char
  "/opt/HDF4.2r4/include/hproto.h", line 402: function cannot return function

However, I *think* that the error might be cause by the "-DSUN" in your
compile line for "hdf.c".

You might need to adjust your $NCARG/config/SolarisPC file to have a
different HDF define other than "SUN", or to remove it 
all together. To use a different define, edit the file and
add the following:

#define HdfDefines      -Dxxxxx

where "xxxxx" is the define for Solaris X86 that the HDF4 build
expects.

Or, to remove it:

#define HdfDefines

Either way you go, you can quickly test your change by typing:

    cd $NCARG/ncarview/src/lib/libncarg_ras
    make me
    make hdf.o

If this seems to work, then you should start the full build from scratch
(to make sure all your Makefiles get regenerated).

    cd $NCARG
    make Everything >&! make-output.2

I don't know if this has any importance, but I googled around and
found this (old) mention of HDF dropping support for Solaris X86:

   http://www.hdfgroup.org/newsletters/newsletter58.html#ds

It may not be an issue, since it sounds like you got HDF4 to build.

--Mary

On Wed, 18 Mar 2009, Wolfgang Cohrs wrote:

> Hello,
> i use cc: Sun C 5.9 SunOS_i386 Patch 124868-05 2008/05/13 on a SunOS 5.10 
> Generic_127128-11 i86pc i386 i86pc.
> i have HDF4.2r4 installed without any problem
> also NCAR Graphics* *without NCL
> but with NCL i have this error
>
>
> cc -Xt  -O  -I../../../.././include -I/usr/openwin/include -I/usr/dt/include 
> -I/usr/include -I/opt/HDF4.2r4/include -I/opt/netCDF_util-1.1/include 
> -DBuildRasterHDF -DSUN -DBuildRasterHPPCL -DBuildRasterNrif -DBuildRasterSun 
> -DBuildRasterXWD  -DBuildRasterAVS -DBuildRasterSGI  -DBuildRasterAbekas 
> -DBuildRasterBinary -DBuildRasterYUV  -DNGTMPDIR='"tmp"' -DPC -DSUN -Bdynamic 
> -D_POSIX_SOURCE -DSYSV -D_XOPEN_SOURCE -D__EXTENSIONS__ -DByteSwapped -Di386 
> -lfsu -DNeedFuncProto   -c  memory.c
> cc -Xt  -O  -I../../../.././include -I/usr/openwin/include -I/usr/dt/include 
> -I/usr/include -I/opt/HDF4.2r4/include -I/opt/netCDF_util-1.1/include 
> -DBuildRasterHDF -DSUN -DBuildRasterHPPCL -DBuildRasterNrif -DBuildRasterSun 
> -DBuildRasterXWD  -DBuildRasterAVS -DBuildRasterSGI  -DBuildRasterAbekas 
> -DBuildRasterBinary -DBuildRasterYUV  -DNGTMPDIR='"tmp"' -DPC -DSUN -Bdynamic 
> -D_POSIX_SOURCE -DSYSV -D_XOPEN_SOURCE -D__EXTENSIONS__ -DByteSwapped -Di386 
> -lfsu -DNeedFuncProto   -c  hdf.c
> "/opt/HDF4.2r4/include/hproto.h", line 402: syntax error before or at: char
> "/opt/HDF4.2r4/include/hproto.h", line 402: function cannot return function 
> or array
> "/opt/HDF4.2r4/include/hproto.h", line 402: warning: old-style declaration or 
> incorrect type for: strdup
> "/opt/HDF4.2r4/include/hproto.h", line 402: identifier redeclared: strdup
>       current : function() returning int
>       previous: function(pointer to const char) returning pointer to char : 
> "/usr/include/string.h", line 90
> "/opt/HDF4.2r4/include/hproto.h", line 402: syntax error before or at: )
> "/opt/HDF4.2r4/include/hproto.h", line 402: warning: syntax error:  empty 
> declaration
> cc: acomp failed for hdf.c
> *** Error code 2
> make: Fatal error: Command failed for target `hdf.o'
> Current working directory 
> /csys/nobackup1_MET/wcohrs/ncl_ncarg-5.1.0/ncarview/src/lib/libncarg_ras
>
> Wolfgang
>
>
> -- 
> Wolfgang Cohrs Stiftung Alfred-Wegener-Institut fuer Polar- und 
> Meeresforschung
> Postfach 120161 D 27515 Bremerhaven
> mailto:Wolfgang.Cohrs at awi.de
> http://www.awi.de/People/show?wcohrs
>
>


More information about the ncl-install mailing list