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

20040503: Installing NetCDF 3.5.1 under Cygwin on Windows 2000



Jack,

>Date: Mon, 03 May 2004 10:44:09 -0500
>From: Jack Williams <address@hidden>
>Organization: ?
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20040429: Installing NetCDF 3.5.1 under Cygwin on Windows 2000

The above message contained the following:

> Cygwin has bison and flex.  I think it uses bison to emulate yacc, so 
> maybe the problem is arising here. 
>
> test0.cdl is attached.

The netCDF package already contains C code for a parser and scanner, so
yacc(1) and lex(1) (or their equivalents) aren't used when the netCDF is
built.  It would appear, however, that this code isn't working right on
your system under Cygwin (hence the syntax error).  I checked the file
"test.cdl" that you attached and there's nothing wrong with it.

I suggest that you try creating the parser and scanner from scratch:

    1.  Go into the "ncgen" subdirectory.

    2.  Execute the following command to rename the relevant files:

            mv ncgentab.c ncgentab.c.orig
            mv ncgentab.h ncgentab.h.orig
            mv ncgenyy.c ncgenyy.c.orig

    3.  Enable creation of the above files on your system by editing the
        file "Makefile":

            A.  Replace the rule for targets "ncgentab.c" and "ncgentab.h"
                with the following

                    bison -y -d ncgen.y
                    mv y.tab.c ncgentab.c
                    mv y.tab.h ncgentab.h

            B.  Replace the rule for target "ncgenyy.c" with the following:

                    lex ncgen.l
                    mv lex.yy.c ncgenyy.c

    4.  Execute the commands "make" and "make test".

Let me know what you discover.

> By the way, I'm not fixated on Cygwin.  If you can recommend another 
> Windows unix/linux emulator that NetCDF works on, I'd be willing to try 
> it. 

I've barely use Cygwin and haven't used any other emulation system, so I
couldn't advice you.

Regards,
Steve Emmerson