[GRASS-dev] [GRASS GIS] #1125: wingrass7 - ctypes - compiling error

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------
trying to compile grass7 (r42983) in the osgeo4w-stack, there is following
error (see for additional information also thread "WinGrass65 + import
gui_modules.nviz_tools as nviz_tools: ImportError" in june-grass-dev-ml:
i.e. http://lists.osgeo.org/pipermail/grass-dev/2010-June/050965.html)

{{{
-------------------------
Started compilation: Tue Aug 3 17:47:06 GMT 2010
--
Errors in:
/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes
--
}}}

and trying make in /c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes

{{{
syringia@NADA /c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes
$ make
make /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib
make[1]: Entering directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make[1]: `/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/ lib' is up to date.
make[1]: Leaving directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make date.py grass.py raster.py gmath.py proj.py imagery.py vector.py
display.p y stats.py dbmi.py g3d.py arraystats.py cluster.py trans.py
vedit.py ogsf.py nv iz.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ date.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/li
b/grass.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass /lib/raster.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/g
rass/lib/gmath.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/pytho n/grass/lib/proj.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/pyt
hon/grass/lib/imagery.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/et c/python/grass/lib/vector.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw3
2/etc/python/grass/lib/display.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-m
ingw32/etc/python/grass/lib/stats.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-p
c-mingw32/etc/python/grass/lib/dbmi.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686 -pc-
mingw32/etc/python/grass/lib/g3d.py
/c/osgeo4w/usr/src/grass_trunk/dist.i68 6-pc-
mingw32/etc/python/grass/lib/arraystats.py /c/osgeo4w/usr/src/grass_trunk/
dist.i686-pc-mingw32/etc/python/grass/lib/cluster.py
/c/osgeo4w/usr/src/grass_t runk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.py /c/osgeo4w/usr/src/gras
s_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/vedit.py
/c/osgeo4w/usr/src/g rass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogsf.py /c/osgeo4w/usr/src
/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/nviz.py
/c/osgeo4w/usr/s rc/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/__init__.py /c/osgeo4w
/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_preamble. py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/cty pes_loader.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/gr
ass/lib/date.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python /grass/lib/grass.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/py
thon/grass/lib/raster.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/e tc/python/grass/lib/gmath.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw
32/etc/python/grass/lib/proj.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mi ngw32/etc/python/grass/lib/imagery.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686 -pc-
mingw32/etc/python/grass/lib/vector.pyc
/c/osgeo4w/usr/src/grass_trunk/dist .i686-pc-
mingw32/etc/python/grass/lib/display.pyc /c/osgeo4w/usr/src/grass_trun
k/dist.i686-pc-mingw32/etc/python/grass/lib/stats.pyc
/c/osgeo4w/usr/src/grass_ trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/dbmi.pyc /c/osgeo4w/usr/src/gra
ss_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/g3d.pyc
/c/osgeo4w/usr/src/g rass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/arraystats.pyc /c/osgeo4w/
usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/cluster.pyc
/c/os geo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.pyc /
c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vedit.p yc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogs f.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/
nviz.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/l ib/__init__.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/
grass/lib/ctypes_preamble.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw 32/etc/python/grass/lib/ctypes_loader.pyc
make[1]: Entering directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
GISRC=/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/demolocation/.grassrc 70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
PATH="/c/osgeo4w /usr/src/grass_trunk/dist.i686-pc-mingw32/bin:$PATH"
PYTHONPATH="c:/osgeo4w/usr /src/grass_trunk/dist.i686-pc-
mingw32/etc/python;$PYTHONPATH" PATH="/c/osgeo4w/
usr/src/grass_trunk/dist.i686-pc-
mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dis t.i686-pc-
mingw32/lib:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/lib:.
:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/windows/system32:/c/windows:/c/
windows/System32/Wbem:/c/Program Files/ATI Technologies/ATI.ACE/Core-
Static:/c/ Program Files/ActivIdentity/ActivClient/:/c/Program Files
/Hewlett-Packard/IAM/b in:/c/Program Files/Common Files/Roxio
Shared/DLLShared/:/c/Program Files/Commo n Files/Roxio
Shared/10.0/DLLShared/:/c/windows/System32/WindowsPowerShell/v1.0
/:/c/Program Files/TortoiseSVN/bin:/c/Program
Files/QuickTime/QTSystem/:/bin" L C_ALL=C ./ctypesgen.py --cpp "gcc -E
-I/c/osgeo4w/usr/src/grass_trunk/dist .i686-pc-mingw32/include
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/ include"
-lgrass_datetime.7.0.svn -lintl /c/osgeo4w/usr/src/grass_trunk/dist.i 686
-pc-mingw32/include/grass/datetime.h
/c/osgeo4w/usr/src/grass_trunk/dist.i68 6-pc-
mingw32/include/grass/P_datetime.h -o date.py
Status: Preprocessing c:\users\syringia\appdata\local\temp\tmppdrcss.h
Status: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/inclu
de -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -U
__GNUC__ -d D "-Dinline=" "-D__inline__=" "-D__extension__="
"-D_Bool=uint8_t" "-D__const=c onst" "-D__asm__(x)=" "-D__asm(x)="
"-DCTYPESGEN=1" c:\users\syringia\appdata\l ocal\temp\tmppdrcss.h
Error: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/includ
e -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include: In file
includ ed from c:\users\syringia\appdata\local\temp\tmppdrcss.h:1:
Error: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/includ
e -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include:
c:\osgeo4w\usr \src\grass_trunk\dist.i686-pc-
mingw32\include\grass\datetime.h:28:30: grass/P_d atetime.h: No such file
or directory
Traceback (most recent call last):
  File "./ctypesgen.py", line 134, in <module>
  descriptions=ctypesgencore.parser.parse(options.headers,options)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\_
_init__.py", line 21, in parse
  parser.parse()
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\d
atacollectingparser.py", line 69, in parse
  ctypesparser.CtypesParser.parse(self,fname,None)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\c
parser.py", line 113, in parse
  self.preprocessor_parser.parse(filename)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\p
reprocessor.py", line 196, in parse
  token = self.lexer.token()
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\p
reprocessor.py", line 51, in token
  result = lex.Lexer.token(self)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\l
ex.py", line 343, in token
  raise LexError, ("Scanning error. Illegal character '%s'" %
(lexdata[lexpos ]), lexdata[lexpos:])
ctypesgencore.parser.lex.LexError: Scanning error. Illegal character '#'
make[1]: *** [date.py] Error 1
make[1]: Leaving directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make: *** [default] Error 2
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by glynn):

Replying to [ticket:1125 hellik]:
> trying to compile grass7 (r42983) in the osgeo4w-stack, there is
following error
>
{{{
Error: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include: c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-
mingw32\include\grass\datetime.h:28:30: grass/P_datetime.h: No such file
or directory
}}}
>

Does that file exist?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by hellik):

Replying to [comment:1 glynn]:
> Replying to [ticket:1125 hellik]:
> > trying to compile grass7 (r42983) in the osgeo4w-stack, there is
following error
> >
> {{{
> Error: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include: c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-
mingw32\include\grass\datetime.h:28:30: grass/P_datetime.h: No such file
or directory
> }}}
> >
>
> Does that file exist?

yes, datetime.h and P_datetime.h exist in

C:\OSGeo4W\usr\src\grass_trunk\dist.i686-pc-mingw32\include\grass

and

C:\OSGeo4W\usr\src\grass_trunk\include

Helmut

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by glynn):

Replying to [comment:2 hellik]:

> > Does that file exist?
>
> yes, datetime.h and P_datetime.h exist in

It think that this is a case of MSys/MinGW (not sure which) only
supporting one filename syntax in any given command. If you have any
native Windows filenames, it doesn't accept MSys filenames. ctypesgen
generates a temporary file, and passes the filename using native syntax.

Unfortunately, I don't know of a definite solution. Forcing Platform.make
to use Windows syntax (i.e. c:/osgeo4w/...) exclusively might work. I
don't know if this can be achieved solely through the choice of configure
switches, or whether you would need to edit Platform.make manually.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by martinl):

Replying to [comment:2 hellik]:
> Replying to [comment:1 glynn]:
> > Replying to [ticket:1125 hellik]:
> > > trying to compile grass7 (r42983) in the osgeo4w-stack, there is
following error
> > >
> > {{{
> > Error: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include: c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-
mingw32\include\grass\datetime.h:28:30: grass/P_datetime.h: No such file
or directory
> > }}}
> > >
> >
> > Does that file exist?
>
> yes, datetime.h and P_datetime.h exist in
>
> C:\OSGeo4W\usr\src\grass_trunk\dist.i686-pc-mingw32\include\grass
>
> and
>
> C:\OSGeo4W\usr\src\grass_trunk\include

strangely I am getting different error

{{{
Status: gcc -E -D_FILE_OFFSET_BITS=64
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -U __GNUC__
-dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t"
"-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1"
c:\users\landa\appdata\local\temp\3\tmpu2so-q.h
Traceback (most recent call last):
   File "./ctypesgen.py", line 134, in <module>
     descriptions=ctypesgencore.parser.parse(options.headers,options)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\__init__.py",
line 21, in parse
     parser.parse()
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\datacollectingparser.py",
line 69, in parse
     ctypesparser.CtypesParser.parse(self,fname,None)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\cparser.py",
line 113, in parse
     self.preprocessor_parser.parse(filename)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 196, in parse
     token = self.lexer.token()
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 51, in token
     result = lex.Lexer.token(self)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\lex.py",
line 343, in token
     raise LexError, ("Scanning error. Illegal character '%s'" %
(lexdata[lexpos]), lexdata[lexpos:])
ctypesgencore.parser.lex.LexError: Scanning error. Illegal character '#'
make[1]: *** [date.py] Error 1
}}}

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by hellik):

Replying to [comment:4 martinl]:
> strangely I am getting different error
>
> {{{
> Status: gcc -E -D_FILE_OFFSET_BITS=64
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -U __GNUC__
-dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t"
"-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1" [...]
> }}}

some time ago I had problems with compiling wingrass7 in WinVista32 and
large file support, because large file support is set automatically by the
configure step via
./mswindows/osgeo4w/package.sh.

so I unset large file support manually in platform.make.

{{{
#Large File Support (LFS)
USE_LARGEFILES =
}}}

so maybe this makes the difference in the two error messages?

Helmut

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by hellik):

Replying to [comment:3 glynn]:
> Replying to [comment:2 hellik]:
>
> > > Does that file exist?
> >
> > yes, datetime.h and P_datetime.h exist in
>
> It think that this is a case of MSys/MinGW (not sure which) only
supporting one filename syntax in any given command. If you have any
native Windows filenames, it doesn't accept MSys filenames. ctypesgen
generates a temporary file, and passes the filename using native syntax.
>
> Unfortunately, I don't know of a definite solution. Forcing
Platform.make to use Windows syntax (i.e. c:/osgeo4w/...) exclusively
might work. I don't know if this can be achieved solely through the choice
of configure switches, or whether you would need to edit Platform.make
manually.

anything that we can test?

Helmut

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by hellik):

Replying to [comment:5 hellik]:
>
> some time ago I had problems with compiling wingrass7 in WinVista32 and
large file support, because large file support is set automatically by the
configure step via
> ./mswindows/osgeo4w/package.sh.
>
> so I unset large file support manually in platform.make.
>
> {{{
> #Large File Support (LFS)
> USE_LARGEFILES =
> }}}
>
> so maybe this makes the difference in the two error messages?
>

if I don't unset manually large file support in platform make, I get
similar error message like Martin.

{{{
syringia@NADA /c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes
$ make
make /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib
make[1]: Entering directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make[1]: `/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib' is up to date.
make[1]: Leaving directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make date.py grass.py raster.py gmath.py proj.py imagery.py vector.py
display.py stats.py dbmi.py g3d.py arraystats.py cluster.py trans.py
vedit.py ogsf.py nviz.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/date.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/grass.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/raster.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/gmath.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/proj.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/imagery.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vector.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/display.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/stats.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/dbmi.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/g3d.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/arraystats.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/cluster.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vedit.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogsf.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/nviz.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/__init__.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_preamble.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_loader.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/date.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/grass.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/raster.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/gmath.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/proj.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/imagery.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vector.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/display.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/stats.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/dbmi.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/g3d.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/arraystats.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/cluster.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vedit.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogsf.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/nviz.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/__init__.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_preamble.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_loader.pyc
make[1]: Entering directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
GISRC=/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/demolocation/.grassrc70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
PATH="/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:$PATH"
PYTHONPATH="c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python;$PYTHONPATH"
PATH="/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/lib:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/windows/system32:/c/windows:/c/windows/System32/Wbem:/c/Program
Files/ATI Technologies/ATI.ACE/Core-Static:/c/Program
Files/ActivIdentity/ActivClient/:/c/Program Files/Hewlett-
Packard/IAM/bin:/c/Program Files/Common Files/Roxio
Shared/DLLShared/:/c/Program Files/Common Files/Roxio
Shared/10.0/DLLShared/:/c/windows/System32/WindowsPowerShell/v1.0/:/c/Program
Files/TortoiseSVN/bin:/c/Program Files/QuickTime/QTSystem/:/bin" LC_ALL=C
./ctypesgen.py --cpp "gcc -E -D_FILE_OFFSET_BITS=64
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include"
-lgrass_datetime.7.0.svn -lintl /c/osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mingw32/include/grass/datetime.h
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include/grass/P_datetime.h -o date.py
Status: Preprocessing c:\users\syringia\appdata\local\temp\tmpjarvxp.h
Status: gcc -E -D_FILE_OFFSET_BITS=64
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -U __GNUC__
-dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t"
"-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1"
c:\users\syringia\appdata\local\temp\tmpjarvxp.h
Error: gcc -E -D_FILE_OFFSET_BITS=64
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include: In file
included from c:\users\syringia\appdata\local\temp\tmpjarvxp.h:1:
Error: gcc -E -D_FILE_OFFSET_BITS=64
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include:
c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-
mingw32\include\grass\datetime.h:28:30: grass/P_datetime.h: No such file
or directory
Traceback (most recent call last):
   File "./ctypesgen.py", line 134, in <module>
     descriptions=ctypesgencore.parser.parse(options.headers,options)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\__init__.py",
line 21, in parse
     parser.parse()
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\datacollectingparser.py",
line 69, in parse
     ctypesparser.CtypesParser.parse(self,fname,None)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\cparser.py",
line 113, in parse
     self.preprocessor_parser.parse(filename)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 196, in parse
     token = self.lexer.token()
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 51, in token
     result = lex.Lexer.token(self)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\lex.py",
line 343, in token
     raise LexError, ("Scanning error. Illegal character '%s'" %
(lexdata[lexpos]), lexdata[lexpos:])
ctypesgencore.parser.lex.LexError: Scanning error. Illegal character '#'
make[1]: *** [date.py] Error 1
make[1]: Leaving directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make: *** [default] Error 2
}}}

but the problem seems to be the same:

=> [...]grass\datetime.h:28:30: grass/P_datetime.h: No such file or
directory

Helmut

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by martinl):

Replying to [comment:5 hellik]:
{{{
> #Large File Support (LFS)
> USE_LARGEFILES =
}}}

BTW, is there a way how to disable LFS? - {{{--disable-largefile}}}
doesn't seems to work.

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by glynn):

Replying to [comment:7 hellik]:

> if I don't unset manually large file support in platform make, I get
similar error message like Martin.

> but the problem seems to be the same:
>
> => [...]grass\datetime.h:28:30: grass/P_datetime.h: No such file or
directory

Except, Martin isn't getting this error.

The Python backtrace is irrelevant; just about any error causes that
backtrace.

As a general rule: only the first error means anything. Any subsequent
errors should be assumed to be symptoms unless there is a specific reason
to believe otherwise.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by martinl):

Replying to [comment:9 glynn]:
> > if I don't unset manually large file support in platform make, I get
similar error message like Martin.
>
> > but the problem seems to be the same:
> >
> > => [...]grass\datetime.h:28:30: grass/P_datetime.h: No such file or
directory
>
> Except, Martin isn't getting this error.

when I set up

{{{
#Large File Support (LFS)
USE_LARGEFILES =
}}}

in {{{include/Make/Platform.make}}}

I am getting the same error

{{{
make[1]: Entering directory
`/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
GISRC=/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/demolocation/.grassrc70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
PATH="/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:$PATH"
PYTHONPATH="c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python;$PYTHONPATH"
PATH="/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/bin:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/lib:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/osgeo4w/bin:/c/Subversion:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program
Files (x86)/Dell/SysMgt/idrac:/c/Program Files
(x86)/Dell/SysMgt/oma/bin:/c/Program Files (x86)/Microsoft SQL
Server/100/Tools/Binn/:/c/Program Files (x86)/Microsoft SQL
Server/100/DTS/Binn/:/bin:/bin:/c/Subversion:/bin:/bin:/c/Subversion"
LC_ALL=C ./ctypesgen.py --cpp "gcc -E
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include"
-lgrass_datetime.7.0.svn -lintl /osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mingw32/include/grass/datetime.h
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include/grass/P_datetime.h -o date.py
Status: Preprocessing c:\users\landa\appdata\local\temp\5\tmpm-gc1i.h
Status: gcc -E -I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include -I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include -U __GNUC__ -dD "-Dinline=" "-D__inline__="
"-D__extension__=" "-D_Bool=uint8_t" "-D__const=const" "-D__asm__(x)="
"-D__asm(x)=" "-DCTYPESGEN=1" c:\users\landa\appdata\local\temp\5\tmpm-
gc1i.h
Traceback (most recent call last):
   File "./ctypesgen.py", line 134, in <module>
     descriptions=ctypesgencore.parser.parse(options.headers,options)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\__init__.py",
line 21, in parse
     parser.parse()
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\datacollectingparser.py",
line 69, in parse
     ctypesparser.CtypesParser.parse(self,fname,None)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\cparser.py",
line 113, in parse
     self.preprocessor_parser.parse(filename)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 196, in parse
     token = self.lexer.token()
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 51, in token
     result = lex.Lexer.token(self)
   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\lex.py",
line 343, in token
     raise LexError, ("Scanning error. Illegal character '%s'" %
(lexdata[lexpos]), lexdata[lexpos:])
ctypesgencore.parser.lex.LexError: Scanning error. Illegal character '#'
make[1]: *** [date.py] Error 1
make[1]: Leaving directory
`/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make: *** [default] Error 2
}}}

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------
Changes (by martinl):

  * priority: normal => blocker
  * milestone: 7.0.0 => 6.5.0

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by hellik):

Replying to [ticket:1125 hellik]:
> trying to compile grass7 (r42983) in the osgeo4w-stack, there is
following error (see for additional information also thread "WinGrass65 +
import gui_modules.nviz_tools as nviz_tools: ImportError" in june-grass-
dev-ml: i.e. http://lists.osgeo.org/pipermail/grass-
dev/2010-June/050965.html)
>
>
> and trying make in /c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes
>

tested again with a completly fresh svn-checkout (r43009) in the osgeo4w-
stack in WinVista32

{{{
syringia@NADA /c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes
$ make
make /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib
make[1]: Entering directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make[1]: `/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/ lib' is up to date.
make[1]: Leaving directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make date.py grass.py raster.py gmath.py proj.py imagery.py vector.py
display.p y stats.py dbmi.py g3d.py arraystats.py cluster.py trans.py
vedit.py ogsf.py nv iz.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ date.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/li
b/grass.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass /lib/raster.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/g
rass/lib/gmath.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/pytho n/grass/lib/proj.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/pyt
hon/grass/lib/imagery.py /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/et c/python/grass/lib/vector.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw3
2/etc/python/grass/lib/display.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-m
ingw32/etc/python/grass/lib/stats.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-p
c-mingw32/etc/python/grass/lib/dbmi.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686 -pc-
mingw32/etc/python/grass/lib/g3d.py
/c/osgeo4w/usr/src/grass_trunk/dist.i68 6-pc-
mingw32/etc/python/grass/lib/arraystats.py /c/osgeo4w/usr/src/grass_trunk/
dist.i686-pc-mingw32/etc/python/grass/lib/cluster.py
/c/osgeo4w/usr/src/grass_t runk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.py /c/osgeo4w/usr/src/gras
s_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/vedit.py
/c/osgeo4w/usr/src/g rass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogsf.py /c/osgeo4w/usr/src
/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/nviz.py
/c/osgeo4w/usr/s rc/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/__init__.py /c/osgeo4w
/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_preamble. py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/cty pes_loader.py
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/gr
ass/lib/date.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python /grass/lib/grass.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/py
thon/grass/lib/raster.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/e tc/python/grass/lib/gmath.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw
32/etc/python/grass/lib/proj.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mi ngw32/etc/python/grass/lib/imagery.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686 -pc-
mingw32/etc/python/grass/lib/vector.pyc
/c/osgeo4w/usr/src/grass_trunk/dist .i686-pc-
mingw32/etc/python/grass/lib/display.pyc /c/osgeo4w/usr/src/grass_trun
k/dist.i686-pc-mingw32/etc/python/grass/lib/stats.pyc
/c/osgeo4w/usr/src/grass_ trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/dbmi.pyc /c/osgeo4w/usr/src/gra
ss_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/g3d.pyc
/c/osgeo4w/usr/src/g rass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/arraystats.pyc /c/osgeo4w/
usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/cluster.pyc
/c/os geo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.pyc /
c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vedit.p yc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogs f.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/lib/
nviz.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/l ib/__init__.pyc
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/
grass/lib/ctypes_preamble.pyc /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw 32/etc/python/grass/lib/ctypes_loader.pyc
make[1]: Entering directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
GISRC=/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/demolocation/.grassrc 70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
PATH="/c/osgeo4w /usr/src/grass_trunk/dist.i686-pc-mingw32/bin:$PATH"
PYTHONPATH="c:/osgeo4w/usr /src/grass_trunk/dist.i686-pc-
mingw32/etc/python;$PYTHONPATH" PATH="/c/osgeo4w/
usr/src/grass_trunk/dist.i686-pc-
mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dis t.i686-pc-
mingw32/lib:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/lib:.
:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/windows/system32:/c/windows:/c/
windows/System32/Wbem:/c/Program Files/ATI Technologies/ATI.ACE/Core-
Static:/c/ Program Files/ActivIdentity/ActivClient/:/c/Program Files
/Hewlett-Packard/IAM/b in:/c/Program Files/Common Files/Roxio
Shared/DLLShared/:/c/Program Files/Commo n Files/Roxio
Shared/10.0/DLLShared/:/c/windows/System32/WindowsPowerShell/v1.0
/:/c/Program Files/TortoiseSVN/bin:/c/Program
Files/QuickTime/QTSystem/:/bin" L C_ALL=C ./ctypesgen.py --cpp "gcc -E
-I/c/osgeo4w/usr/src/grass_trunk/dist .i686-pc-mingw32/include
-I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/ include"
-lgrass_datetime.7.0.svn -lintl /c/osgeo4w/usr/src/grass_trunk/dist.i 686
-pc-mingw32/include/grass/datetime.h
/c/osgeo4w/usr/src/grass_trunk/dist.i68 6-pc-
mingw32/include/grass/P_datetime.h -o date.py
Status: Preprocessing c:\users\syringia\appdata\local\temp\tmpx0ccm8.h
Status: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/inclu
de -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -U
__GNUC__ -d D "-Dinline=" "-D__inline__=" "-D__extension__="
"-D_Bool=uint8_t" "-D__const=c onst" "-D__asm__(x)=" "-D__asm(x)="
"-DCTYPESGEN=1" c:\users\syringia\appdata\l ocal\temp\tmpx0ccm8.h
Error: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/includ
e -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include: In file
includ ed from c:\users\syringia\appdata\local\temp\tmpx0ccm8.h:1:
Error: gcc -E -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/includ
e -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include:
c:\osgeo4w\usr \src\grass_trunk\dist.i686-pc-
mingw32\include\grass\datetime.h:28:30: grass/P_d atetime.h: No such file
or directory
Traceback (most recent call last):
  File "./ctypesgen.py", line 134, in <module>
   descriptions=ctypesgencore.parser.parse(options.headers,options)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\_
_init__.py", line 21, in parse
   parser.parse()
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\d
atacollectingparser.py", line 69, in parse
   ctypesparser.CtypesParser.parse(self,fname,None)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\c
parser.py", line 113, in parse
   self.preprocessor_parser.parse(filename)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\p
reprocessor.py", line 196, in parse
   token = self.lexer.token()
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\p
reprocessor.py", line 51, in token
   result = lex.Lexer.token(self)
  File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\l
ex.py", line 343, in token
   raise LexError, ("Scanning error. Illegal character '%s'" %
(lexdata[lexpos ]), lexdata[lexpos:])
ctypesgencore.parser.lex.LexError: Scanning error. Illegal character '#'
make[1]: *** [date.py] Error 1
make[1]: Leaving directory
`/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make: *** [default] Error 2
}}}

there is no difference to my initial post.

Helmut

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by martinl):

Replying to [comment:8 martinl]:
> Replying to [comment:5 hellik]:
> {{{
> > #Large File Support (LFS)
> > USE_LARGEFILES =
> }}}
>
> BTW, is there a way how to disable LFS? - {{{--disable-largefile}}}
doesn't seems to work.

using {{{--disable-largefile}}} I am getting on *MS Windows*

{{{
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... no
checking if system supports Large Files at all... yes
}}}

and

{{{
USE_LARGEFILES = 1
}}}

On *GNU/Linux* I am getting expected result

{{{
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... yes
checking if system supports Large Files at all... no
}}}

and

{{{
USE_LARGEFILES =
}}}

Not sure why it's not working on MS Windows.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by glynn):

Replying to [comment:13 martinl]:

> > BTW, is there a way how to disable LFS? - {{{--disable-largefile}}}
doesn't seems to work.
>
> using {{{--disable-largefile}}} I am getting on *MS Windows*
>
{{{
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... no
checking if system supports Large Files at all... yes
}}}
>
> and
>
{{{
USE_LARGEFILES = 1
}}}

> Not sure why it's not working on MS Windows.

The "meta" answer is: because the code was lifted wholesale from cdrtools
without any attempt at understanding it.

The Windows check for "if system supports Large Files at all" tests that
off64_t can represent 2^63-1, and that fseeko64 and ftello64 exist. This
check will always pass.

The Linux check tests that off_t can represent 2^63-1 and that fseeko and
ftello exist. These checks will only pass if the relevant feature macros
have been defined.

Essentially, Linux has macros to enable the LFS features and to make LFS
the default. Windows has neither; the LFS features are always available
but must be used explicitly.

The USE_LARGEFILES setting is based upon whether the LFS check passes, not
whether you requested LFS. On Linux, they're effectively the same thing,
as the LFS check will only pass if you ask for it; on Windows, it always
passes.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by mmetz):

Replying to [comment:14 glynn]:
> Replying to [comment:13 martinl]:
>
> > > BTW, is there a way how to disable LFS? - {{{--disable-largefile}}}
doesn't seems to work.
> >
> > using {{{--disable-largefile}}} I am getting on *MS Windows*
> >
> {{{
> checking for _LARGEFILE_SOURCE value needed for large files... no
> checking for fseeko... no
> checking if system supports Large Files at all... yes
> }}}
> >
> > and
> >
> {{{
> USE_LARGEFILES = 1
> }}}
>
> > Not sure why it's not working on MS Windows.
>
> The "meta" answer is: because the code was lifted wholesale from
cdrtools without any attempt at understanding it.
>
Well, let's make an attempt at understanding it. For grass 7, I suggest to
remove the --enable-largefile configure option and issue a warning if LFS
is not available. Global LFS for grass 7 is already there, for Linux and
Mac. For wingrass, it's coming soon, but I will need some help.

This reply belongs to a new thread, I'll open one.

Markus M

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass7 - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by glynn):

Replying to [comment:15 mmetz]:
> > The "meta" answer is: because the code was lifted wholesale from
cdrtools without any attempt at understanding it.
>
> Well, let's make an attempt at understanding it. For grass 7, I suggest
to remove the --enable-largefile configure option and issue a warning if
LFS is not available.

Our experience has been that configure warnings get overlooked. For
anything remotely important, the policy is to generate an error, on the
assumption that the user won't overlook having to re-run configure with an
extra --without-something switch.

FWIW, this specific issue should be easy enough to fix: wrap the test for
$ac_cv_largefiles inside a test for $enable_largefile.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:16&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------
Changes (by martinl):

* cc: martinl (added)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1125#comment:17&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by martinl):

Replying to [comment:12 hellik]:
> there is no difference to my initial post.

the same here, when I try to print lex data
([source:grass/trunk/lib/python/ctypes/ctypesgencore/parser/lex.py]) I am
getting

{{{
  /osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python/grass/lib
make[1]: Entering directory
`/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make[1]: `/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib' is up to date.
make[1]: Leaving directory
`/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make date.py grass.py raster.py gmath.py proj.py imagery.py vector.py
display.py stats.py dbmi.py g3d.py arraystats.py cluster.py trans.py
vedit.py ogsf.py nviz.py /osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/date.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/grass.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/raster.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/gmath.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/proj.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/imagery.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vector.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/display.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/stats.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/dbmi.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/g3d.py /osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mingw32/etc/python/grass/lib/arraystats.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/cluster.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vedit.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogsf.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/nviz.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/__init__.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_preamble.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_loader.py
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/date.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/grass.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/raster.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/gmath.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/proj.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/imagery.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vector.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/display.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/stats.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/dbmi.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/g3d.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/arraystats.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/cluster.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/trans.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/vedit.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ogsf.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/nviz.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/__init__.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_preamble.pyc
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python/grass/lib/ctypes_loader.pyc
make[1]: Entering directory
`/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
GISRC=/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/demolocation/.grassrc70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
PATH="/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:$PATH"
PYTHONPATH="c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/etc/python;$PYTHONPATH"
PATH="/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/bin:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/lib:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/osgeo4w/bin:/c/Subversion:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program
Files (x86)/Dell/SysMgt/idrac:/c/Program Files
(x86)/Dell/SysMgt/oma/bin:/c/Program Files (x86)/Microsoft SQL
Server/100/Tools/Binn/:/c/Program Files (x86)/Microsoft SQL
Server/100/DTS/Binn/:/bin:/bin:/c/Subversion:/bin:/bin:/c/Subversion"
LC_ALL=C ./ctypesgen.py --cpp "gcc -E -D_FILE_OFFSET_BITS=64
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include"
-lgrass_datetime.7.0.svn -lintl /osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mingw32/include/grass/datetime.h
/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include/grass/P_datetime.h -o date.py
Status: Preprocessing c:\users\landa\appdata\local\temp\2\tmp9xn3by.h

Status: gcc -E -D_FILE_OFFSET_BITS=64
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include
-I/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -U __GNUC__
-dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t"
"-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1"
c:\users\landa\appdata\local\temp\2\tmp9xn3by.h

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "<built-in>"

# 1 "<command line>"

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 1

typedef struct DateTime

{

     int mode;

     int from, to;

     int fracsec;

     int year, month, day;

     int hour, minute;

     double second;

     int positive;

     int tz;

} DateTime;

# 1 "/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include/grass/P_datetime.h" 1

int datetime_is_between(int x, int a, int b);

int datetime_change_from_to(DateTime * dt, int from, int to, int round);

void datetime_copy(DateTime * src, const DateTime * dst);

int datetime_difference(const DateTime * a, const DateTime * b,

    DateTime * result);

int datetime_error(int code, char *msg);

int datetime_error_code(void);

char *datetime_error_msg(void);

void datetime_clear_error(void);

int datetime_format(const DateTime * dt, char *buf);

int datetime_increment(DateTime * src, DateTime * incr);

int datetime_is_valid_increment(const DateTime * src, const DateTime *
incr);

int datetime_check_increment(const DateTime * src, const DateTime * incr);

int datetime_get_increment_type(const DateTime * dt, int *mode, int *from,

     int *to, int *fracsec);

int datetime_set_increment_type(const DateTime * src, DateTime * incr);

int datetime_get_local_timezone(int *minutes);

void datetime_get_local_time(DateTime * dt);

int datetime_days_in_month(int year, int month, int ad);

int datetime_is_leap_year(int year, int ad);

int datetime_days_in_year(int year, int ad);

int datetime_is_same(const DateTime * src, const DateTime * dst);

int datetime_scan(DateTime * dt, const char *buf);

int datetime_is_positive(const DateTime * dt);

int datetime_is_negative(const DateTime * dt);

void datetime_set_positive(DateTime * dt);

void datetime_set_negative(DateTime * dt);

void datetime_invert_sign(DateTime * dt);

int datetime_set_type(DateTime * dt, int mode, int from, int to, int
fracsec);

int datetime_get_type(const DateTime * dt, int *mode, int *from, int *to,

         int *fracsec);

int datetime_is_valid_type(const DateTime * dt);

int datetime_check_type(const DateTime * dt);

int datetime_in_interval_year_month(int x);

int datetime_in_interval_day_second(int x);

int datetime_is_absolute(const DateTime * dt);

int datetime_is_relative(const DateTime * dt);

int datetime_check_timezone(const DateTime * dt, int minutes);

int datetime_get_timezone(const DateTime * dt, int *minutes);

int datetime_set_timezone(DateTime * dt, int minutes);

int datetime_unset_timezone(DateTime * dt);

int datetime_is_valid_timezone(int minutes);

int datetime_change_timezone(DateTime * dt, int minutes);

int datetime_change_to_utc(DateTime * dt);

void datetime_decompose_timezone(int tz, int *hours, int *minutes);

int datetime_check_year(const DateTime * dt, int year);

int datetime_check_month(const DateTime * dt, int month);

int datetime_check_day(const DateTime * dt, int day);

int datetime_check_hour(const DateTime * dt, int hour);

int datetime_check_minute(const DateTime * dt, int minute);

int datetime_check_second(const DateTime * dt, double second);

int datetime_check_fracsec(const DateTime * dt, int fracsec);

int datetime_get_year(const DateTime * dt, int *year);

int datetime_set_year(DateTime * dt, int year);

int datetime_get_month(const DateTime * dt, int *month);

int datetime_set_month(DateTime * dt, int month);

int datetime_get_day(const DateTime * dt, int *day);

int datetime_set_day(DateTime * dt, int day);

int datetime_get_hour(const DateTime * dt, int *hour);

int datetime_set_hour(DateTime * dt, int hour);

int datetime_get_minute(const DateTime * dt, int *minute);

int datetime_set_minute(DateTime * dt, int minute);

int datetime_get_second(const DateTime * dt, double *second);

int datetime_set_second(DateTime * dt, double second);

int datetime_get_fracsec(const DateTime * dt, int *fracsec);

int datetime_set_fracsec(DateTime * dt, int fracsec);

# 29 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 2

# 2 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\P_datetime.h" 1

# 3 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "<built-in>"

#define __STDC_HOSTED__ 1

#define __GNUC__ 3

#define __GNUC_MINOR__ 4

#define __GNUC_PATCHLEVEL__ 5

#define __SIZE_TYPE__ unsigned int

#define __PTRDIFF_TYPE__ int

#define __WCHAR_TYPE__ short unsigned int

#define __WINT_TYPE__ short unsigned int

#define __GXX_ABI_VERSION 1002

#define __USING_SJLJ_EXCEPTIONS__ 1

#define __SCHAR_MAX__ 127

#define __SHRT_MAX__ 32767

#define __INT_MAX__ 2147483647

#define __LONG_MAX__ 2147483647L

#define __LONG_LONG_MAX__ 9223372036854775807LL

#define __WCHAR_MAX__ 65535U

#define __CHAR_BIT__ 8

#define __FLT_EVAL_METHOD__ 2

#define __FLT_RADIX__ 2

#define __FLT_MANT_DIG__ 24

#define __FLT_DIG__ 6

#define __FLT_MIN_EXP__ (-125)

#define __FLT_MIN_10_EXP__ (-37)

#define __FLT_MAX_EXP__ 128

#define __FLT_MAX_10_EXP__ 38

#define __FLT_MAX__ 3.40282347e+38F

#define __FLT_MIN__ 1.17549435e-38F

#define __FLT_EPSILON__ 1.19209290e-7F

#define __FLT_DENORM_MIN__ 1.40129846e-45F

#define __FLT_HAS_INFINITY__ 1

#define __FLT_HAS_QUIET_NAN__ 1

#define __DBL_MANT_DIG__ 53

#define __DBL_DIG__ 15

#define __DBL_MIN_EXP__ (-1021)

#define __DBL_MIN_10_EXP__ (-307)

#define __DBL_MAX_EXP__ 1024

#define __DBL_MAX_10_EXP__ 308

#define __DBL_MAX__ 1.7976931348623157e+308

#define __DBL_MIN__ 2.2250738585072014e-308

#define __DBL_EPSILON__ 2.2204460492503131e-16

#define __DBL_DENORM_MIN__ 4.9406564584124654e-324

#define __DBL_HAS_INFINITY__ 1

#define __DBL_HAS_QUIET_NAN__ 1

#define __LDBL_MANT_DIG__ 64

#define __LDBL_DIG__ 18

#define __LDBL_MIN_EXP__ (-16381)

#define __LDBL_MIN_10_EXP__ (-4931)

#define __LDBL_MAX_EXP__ 16384

#define __LDBL_MAX_10_EXP__ 4932

#define __DECIMAL_DIG__ 21

#define __LDBL_MAX__ 1.18973149535723176502e+4932L

#define __LDBL_MIN__ 3.36210314311209350626e-4932L

#define __LDBL_EPSILON__ 1.08420217248550443401e-19L

#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L

#define __LDBL_HAS_INFINITY__ 1

#define __LDBL_HAS_QUIET_NAN__ 1

#define __REGISTER_PREFIX__

#define __USER_LABEL_PREFIX__ _

#define __VERSION__ "3.4.5 (mingw-vista special r3)"

#define __NO_INLINE__ 1

#define __FINITE_MATH_ONLY__ 0

#define __i386 1

#define __i386__ 1

#define i386 1

#define __tune_i686__ 1

#define __tune_pentiumpro__ 1

#define _X86_ 1

#define __stdcall __attribute__((__stdcall__))

#define __fastcall __attribute__((__fastcall__))

#define __cdecl __attribute__((__cdecl__))

#define __declspec(x) __attribute__((x))

#define _stdcall __attribute__((__stdcall__))

#define _fastcall __attribute__((__fastcall__))

#define _cdecl __attribute__((__cdecl__))

#define __MSVCRT__ 1

#define __MINGW32__ 1

#define _WIN32 1

#define __WIN32 1

#define __WIN32__ 1

#define WIN32 1

#define __WINNT 1

#define __WINNT__ 1

#define WINNT 1

# 1 "<command line>"

#define _FILE_OFFSET_BITS 64

#define inline

#define __inline__

#define __extension__

#define _Bool uint8_t

#define __const const

#define __asm__(x)

#define __asm(x)

#define CTYPESGEN 1

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 1

#define GRASS_DATETIME_H

#define DATETIME_ABSOLUTE 1

#define DATETIME_RELATIVE 2

#define DATETIME_YEAR 1

#define DATETIME_MONTH 2

#define DATETIME_DAY 3

#define DATETIME_HOUR 4

#define DATETIME_MINUTE 5

#define DATETIME_SECOND 6

# 1 "/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include/grass/P_datetime.h" 1

#define GRASS_P_DATETIME_H

# 29 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 2

# 2 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\P_datetime.h" 1

# 3 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "<built-in>"

# 1 "<command line>"

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 1

typedef struct DateTime

{

     int mode;

     int from, to;

     int fracsec;

     int year, month, day;

     int hour, minute;

     double second;

     int positive;

     int tz;

} DateTime;

# 1 "/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include/grass/P_datetime.h" 1

int datetime_is_between(int x, int a, int b);

int datetime_change_from_to(DateTime * dt, int from, int to, int round);

void datetime_copy(DateTime * src, const DateTime * dst);

int datetime_difference(const DateTime * a, const DateTime * b,

    DateTime * result);

int datetime_error(int code, char *msg);

int datetime_error_code(void);

char *datetime_error_msg(void);

void datetime_clear_error(void);

int datetime_format(const DateTime * dt, char *buf);

int datetime_increment(DateTime * src, DateTime * incr);

int datetime_is_valid_increment(const DateTime * src, const DateTime *
incr);

int datetime_check_increment(const DateTime * src, const DateTime * incr);

int datetime_get_increment_type(const DateTime * dt, int *mode, int *from,

     int *to, int *fracsec);

int datetime_set_increment_type(const DateTime * src, DateTime * incr);

int datetime_get_local_timezone(int *minutes);

void datetime_get_local_time(DateTime * dt);

int datetime_days_in_month(int year, int month, int ad);

int datetime_is_leap_year(int year, int ad);

int datetime_days_in_year(int year, int ad);

int datetime_is_same(const DateTime * src, const DateTime * dst);

int datetime_scan(DateTime * dt, const char *buf);

int datetime_is_positive(const DateTime * dt);

int datetime_is_negative(const DateTime * dt);

void datetime_set_positive(DateTime * dt);

void datetime_set_negative(DateTime * dt);

void datetime_invert_sign(DateTime * dt);

int datetime_set_type(DateTime * dt, int mode, int from, int to, int
fracsec);

int datetime_get_type(const DateTime * dt, int *mode, int *from, int *to,

         int *fracsec);

int datetime_is_valid_type(const DateTime * dt);

int datetime_check_type(const DateTime * dt);

int datetime_in_interval_year_month(int x);

int datetime_in_interval_day_second(int x);

int datetime_is_absolute(const DateTime * dt);

int datetime_is_relative(const DateTime * dt);

int datetime_check_timezone(const DateTime * dt, int minutes);

int datetime_get_timezone(const DateTime * dt, int *minutes);

int datetime_set_timezone(DateTime * dt, int minutes);

int datetime_unset_timezone(DateTime * dt);

int datetime_is_valid_timezone(int minutes);

int datetime_change_timezone(DateTime * dt, int minutes);

int datetime_change_to_utc(DateTime * dt);

void datetime_decompose_timezone(int tz, int *hours, int *minutes);

int datetime_check_year(const DateTime * dt, int year);

int datetime_check_month(const DateTime * dt, int month);

int datetime_check_day(const DateTime * dt, int day);

int datetime_check_hour(const DateTime * dt, int hour);

int datetime_check_minute(const DateTime * dt, int minute);

int datetime_check_second(const DateTime * dt, double second);

int datetime_check_fracsec(const DateTime * dt, int fracsec);

int datetime_get_year(const DateTime * dt, int *year);

int datetime_set_year(DateTime * dt, int year);

int datetime_get_month(const DateTime * dt, int *month);

int datetime_set_month(DateTime * dt, int month);

int datetime_get_day(const DateTime * dt, int *day);

int datetime_set_day(DateTime * dt, int day);

int datetime_get_hour(const DateTime * dt, int *hour);

int datetime_set_hour(DateTime * dt, int hour);

int datetime_get_minute(const DateTime * dt, int *minute);

int datetime_set_minute(DateTime * dt, int minute);

int datetime_get_second(const DateTime * dt, double *second);

int datetime_set_second(DateTime * dt, double second);

int datetime_get_fracsec(const DateTime * dt, int *fracsec);

int datetime_set_fracsec(DateTime * dt, int fracsec);

# 29 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 2

# 2 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\P_datetime.h" 1

# 3 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "<built-in>"

#define __STDC_HOSTED__ 1

#define __GNUC__ 3

#define __GNUC_MINOR__ 4

#define __GNUC_PATCHLEVEL__ 5

#define __SIZE_TYPE__ unsigned int

#define __PTRDIFF_TYPE__ int

#define __WCHAR_TYPE__ short unsigned int

#define __WINT_TYPE__ short unsigned int

#define __GXX_ABI_VERSION 1002

#define __USING_SJLJ_EXCEPTIONS__ 1

#define __SCHAR_MAX__ 127

#define __SHRT_MAX__ 32767

#define __INT_MAX__ 2147483647

#define __LONG_MAX__ 2147483647L

#define __LONG_LONG_MAX__ 9223372036854775807LL

#define __WCHAR_MAX__ 65535U

#define __CHAR_BIT__ 8

#define __FLT_EVAL_METHOD__ 2

#define __FLT_RADIX__ 2

#define __FLT_MANT_DIG__ 24

#define __FLT_DIG__ 6

#define __FLT_MIN_EXP__ (-125)

#define __FLT_MIN_10_EXP__ (-37)

#define __FLT_MAX_EXP__ 128

#define __FLT_MAX_10_EXP__ 38

#define __FLT_MAX__ 3.40282347e+38F

#define __FLT_MIN__ 1.17549435e-38F

#define __FLT_EPSILON__ 1.19209290e-7F

#define __FLT_DENORM_MIN__ 1.40129846e-45F

#define __FLT_HAS_INFINITY__ 1

#define __FLT_HAS_QUIET_NAN__ 1

#define __DBL_MANT_DIG__ 53

#define __DBL_DIG__ 15

#define __DBL_MIN_EXP__ (-1021)

#define __DBL_MIN_10_EXP__ (-307)

#define __DBL_MAX_EXP__ 1024

#define __DBL_MAX_10_EXP__ 308

#define __DBL_MAX__ 1.7976931348623157e+308

#define __DBL_MIN__ 2.2250738585072014e-308

#define __DBL_EPSILON__ 2.2204460492503131e-16

#define __DBL_DENORM_MIN__ 4.9406564584124654e-324

#define __DBL_HAS_INFINITY__ 1

#define __DBL_HAS_QUIET_NAN__ 1

#define __LDBL_MANT_DIG__ 64

#define __LDBL_DIG__ 18

#define __LDBL_MIN_EXP__ (-16381)

#define __LDBL_MIN_10_EXP__ (-4931)

#define __LDBL_MAX_EXP__ 16384

#define __LDBL_MAX_10_EXP__ 4932

#define __DECIMAL_DIG__ 21

#define __LDBL_MAX__ 1.18973149535723176502e+4932L

#define __LDBL_MIN__ 3.36210314311209350626e-4932L

#define __LDBL_EPSILON__ 1.08420217248550443401e-19L

#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L

#define __LDBL_HAS_INFINITY__ 1

#define __LDBL_HAS_QUIET_NAN__ 1

#define __REGISTER_PREFIX__

#define __USER_LABEL_PREFIX__ _

#define __VERSION__ "3.4.5 (mingw-vista special r3)"

#define __NO_INLINE__ 1

#define __FINITE_MATH_ONLY__ 0

#define __i386 1

#define __i386__ 1

#define i386 1

#define __tune_i686__ 1

#define __tune_pentiumpro__ 1

#define _X86_ 1

#define __stdcall __attribute__((__stdcall__))

#define __fastcall __attribute__((__fastcall__))

#define __cdecl __attribute__((__cdecl__))

#define __declspec(x) __attribute__((x))

#define _stdcall __attribute__((__stdcall__))

#define _fastcall __attribute__((__fastcall__))

#define _cdecl __attribute__((__cdecl__))

#define __MSVCRT__ 1

#define __MINGW32__ 1

#define _WIN32 1

#define __WIN32 1

#define __WIN32__ 1

#define WIN32 1

#define __WINNT 1

#define __WINNT__ 1

#define WINNT 1

# 1 "<command line>"

#define _FILE_OFFSET_BITS 64

#define inline

#define __inline__

#define __extension__

#define _Bool uint8_t

#define __const const

#define __asm__(x)

#define __asm(x)

#define CTYPESGEN 1

# 1 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h"

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 1

#define GRASS_DATETIME_H

#define DATETIME_ABSOLUTE 1

#define DATETIME_RELATIVE 2

#define DATETIME_YEAR 1

#define DATETIME_MONTH 2

#define DATETIME_DAY 3

#define DATETIME_HOUR 4

#define DATETIME_MINUTE 5

#define DATETIME_SECOND 6

# 1 "/osgeo4w/usr/src/grass_trunk/dist.i686-pc-
mingw32/include/grass/P_datetime.h" 1

#define GRASS_P_DATETIME_H

# 29 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\datetime.h" 2

# 2 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

# 1 "c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-
mingw32\\include\\grass\\P_datetime.h" 1

# 3 "c:\\users\\landa\\appdata\\local\\temp\\2\\tmp9xn3by.h" 2

Traceback (most recent call last):

   File "./ctypesgen.py", line 134, in <module>

     descriptions=ctypesgencore.parser.parse(options.headers,options)

   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\__init__.py",
line 21, in parse

     parser.parse()

   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\datacollectingparser.py",
line 69, in parse

     ctypesparser.CtypesParser.parse(self,fname,None)

   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\cparser.py",
line 113, in parse

     self.preprocessor_parser.parse(filename)

   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 196, in parse

     token = self.lexer.token()

   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\preprocessor.py",
line 51, in token

     result = lex.Lexer.token(self)

   File
"c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\parser\lex.py",
line 344, in token

     raise LexError, ("Scanning error. Illegal character '%s'" %
(lexdata[lexpos]), lexdata[lexpos:])

ctypesgencore.parser.lex.LexError: Scanning error. Illegal character '#'

make[1]: *** [date.py] Error 1
make[1]: Leaving directory
`/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make: *** [default] Error 2
}}}

Similar stuff is created on Linux, but on Windows it's end up with error.
No idea why.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:18&gt;
GRASS GIS <http://grass.osgeo.org>

#1125: wingrass - ctypes - compiling error
------------------------------+---------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.5.0
Component: Compiling | Version: svn-trunk
Keywords: wingrass, ctypes | Platform: MSWindows Vista
      Cpu: x86-32 |
------------------------------+---------------------------------------------

Comment(by glynn):

Replying to [comment:18 martinl]:

> > there is no difference to my initial post.
>
> the same here, when I try to print lex data
([source:grass/trunk/lib/python/ctypes/ctypesgencore/parser/lex.py]) I am
getting

Ugh; that much text should ideally be an attachment rather than inline.

Anyhow: the parser is getting confused by CRLFs; the regexps for
preprocessor directives match the entire line as a single token, and they
don't allow for a CR.

Try r43118.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1125#comment:19&gt;
GRASS GIS <http://grass.osgeo.org>