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

20040512: Installing NetCDF 3.5.1 under Cygwin on Windows 2000



Jack,

>Date: Wed, 12 May 2004 10:35:38 -0500
>From: Jack Williams <address@hidden>
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20040503: Installing NetCDF 3.5.1 under Cygwin on Windows 2000

The above message contained the following:

> I replaced the entire rule for the "ncgentab.c" and "ncgentab.h" 
> targets.  Now, when running "make" and "make test" I get the following 
> output:
> $ make
> Warning: ncgenyy.c is out-of-date with respect to ncgen.l
> Warning: It should be recreated via flex on a SunOS 5 system
> + flex -l ncgen.l
> + mv lex.yy.c ncgenyy.c
> + set +x
> bison -y -d  ncgen.y
> conflicts: 1 shift/reduce
> mv y.tab.c ncgentab.c
> mv y.tab.h ncgentab.h
> gcc -c -O -I../libsrc -I.  -Df2cFortran ncgentab.c
> gcc -o ncgen -O  main.o load.o ncgentab.o escapes.o getfill.o init.o 
> genlib.o ..
> /libsrc/libnetcdf.a
> Info: resolving _opterr by linking to __imp__opterr (auto-import)
> Info: resolving _optarg by linking to __imp__optarg (auto-import)
> Info: resolving _optind by linking to __imp__optind (auto-import)

The above looks good: both bison(1) and flex(1) were used to generate a
Cygwin-specific parser and scanner, respectively.

> $ make test
> ./ncgen -b -o c0.nc c0.cdl
> ncgen: c0.cdl: syntax error
> make: *** [c1.cdl] Error 1

Hmm...  There could be something wrong with the file "c0.cdl".  Would
you please send it to me.

If there's nothing wrong with the file "c0.cdl", then we'll need to
discover the cause of the syntax error.  This will require putting
the bison(1)-generated parser into a debugging mode.  If the Cygwin
bison is like our Linux bison(1), then the makefile rule for the target
"ncgentab.c must be modified to add the option "--debug" to the bison(1)
invocation.  Then the file "ncgentab.c" must be removed and the commands
"make all" and "make test" re-exeucted.

There might be something else that's necessary in order to obtain
debugging information from the parser.  You'd better check with the
man(1)ual page for bison(1).

> The current Makefile is attached.  I made sure to remove copies of 
> ncgentab.c, ncgentab.h, and ncgenyy.c before running make. 

The makefile looked OK.

> I am very grateful for your help. 

No problem.

> Cheers,
> Jack

Regards,
Steve Emmerson