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

Re: 960403: trouble using ln during netcdf install



>From: Kathryn Elder <address@hidden>
>Subject: trouble using ln during netcdf install
>Keywords: 199604032041.AA07139

Hi Kathryn,

> Help?!
>       I am trying to get the upgraded version of GMT going on our system
> and am having trouble wit the netCDF makefile.  We have an HP Unix system
> and the tail of the log looks like this: 
> ________________________________________________________________________________
> making `all' in directory /users/kle/bin/gmt/netcdf-232pl2/ncgen
> 
> gcc -traditional -O -O main.o generate.o load.o ncgentab.o escapes.o 
> getfill.o i
> nit.o close.o genlib.o ../libsrc/libnetcdf.a -o ncgen
> /bin/ld: Unsatisfied symbols:
>    STREQ (code)
> collect: ld returned 1 exit status
> *** Error code 1
> 
> Stop.
> *** Error code 1
> 
> Stop.
> 
> ____________________________________________________________________________________
> 
> I noticed that in the Makefile, there were some commented out lines referring 
> to
> SO_OBJS which are later referred to in the following call to ld.  Shown below:
> 
> 
> 
> #       else \
> #           $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(LIB_SO) \
> #               SO_OBJS="$$so_objs"; \
> #       fi
> #       @if [ -z "$(SA_OBJS)" ]; then \
> #           :; \
> #       else \
> #           $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(LIB_SA); \
> #       fi
> 
> $(LIB_SO):      $(SO_OBJS)
>         ld -assert pure-text $(SO_OBJS) -o $@
>         
>  Any troubleshooting tips for me?

STREQ is just a macro defined on line 8 of ncgen.l, and this is enough to
get it defined for most compiling environments, but apparently not for the
HPUX/gcc platform you are using.  Here are three alternative workarounds:

 1. Use the more recent version (2.4.1) netCDF found at

      ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.Z

    In this version, the STREQ definition has been moved to the top of the
    ncgen.y file, where it also works fine.

 2. Copy the STREQ definition to near the top of ncgen.y, right before the
    definition of the YYSTYPE macro and invoke "make" again.

 3. Use the native cc and yacc that come with HPUX instead of gcc/bison
    (this may involve changing your PATH variable and rerunning the
    "configure" script).

______________________________________________________________________________

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