Opened 10 years ago

Closed 9 years ago

#1125 closed defect (fixed)

wingrass - ctypes - compiling error

Reported by: hellik Owned by: grass-dev@…
Priority: blocker Milestone: 6.5.0
Component: Compiling Version: svn-trunk
Keywords: wingrass, ctypes Cc: martinl
CPU: x86-32 Platform: MSWindows Vista

Description

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

Attachments (1)

package.zip (109.8 KB) - added by hellik 10 years ago.
build output

Download all attachments as: .zip

Change History (46)

comment:1 in reply to:  description ; Changed 10 years ago by glynn

Replying to 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?

comment:2 in reply to:  1 ; Changed 10 years ago by hellik

Replying to glynn:

Replying to 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

comment:3 in reply to:  2 ; Changed 10 years ago by glynn

Replying to 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.

comment:4 in reply to:  2 ; Changed 10 years ago by martinl

Replying to hellik:

Replying to glynn:

Replying to 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

comment:5 in reply to:  4 ; Changed 10 years ago by hellik

Replying to 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

comment:6 in reply to:  3 Changed 10 years ago by hellik

Replying to glynn:

Replying to 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

comment:7 in reply to:  5 ; Changed 10 years ago by hellik

Replying to 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

comment:8 in reply to:  5 ; Changed 10 years ago by martinl

Replying to hellik:

> #Large File Support (LFS)
> USE_LARGEFILES      = 

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

Martin

comment:9 in reply to:  7 ; Changed 10 years ago by glynn

Replying to 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.

comment:10 in reply to:  9 Changed 10 years ago by martinl

Replying to 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

comment:11 Changed 10 years ago by martinl

Milestone: 7.0.06.5.0
Priority: normalblocker

comment:12 in reply to:  description ; Changed 10 years ago by hellik

Replying to 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

comment:13 in reply to:  8 ; Changed 10 years ago by martinl

Replying to martinl:

Replying to 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.

comment:14 in reply to:  13 ; Changed 10 years ago by glynn

Replying to 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 263-1, and that fseeko64 and ftello64 exist. This check will always pass.

The Linux check tests that off_t can represent 263-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.

comment:15 in reply to:  14 ; Changed 10 years ago by mmetz

Replying to glynn:

Replying to 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

comment:16 in reply to:  15 Changed 10 years ago by glynn

Replying to 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.

comment:17 Changed 10 years ago by martinl

Cc: martinl added
Summary: wingrass7 - ctypes - compiling errorwingrass - ctypes - compiling error

comment:18 in reply to:  12 ; Changed 10 years ago by martinl

Replying to hellik:

there is no difference to my initial post.

the same here, when I try to print lex data (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.

comment:19 in reply to:  18 ; Changed 10 years ago by glynn

Replying to martinl:

there is no difference to my initial post.

the same here, when I try to print lex data (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.

comment:20 in reply to:  19 ; Changed 10 years ago by hellik

Replying to glynn:

Replying to martinl:

there is no difference to my initial post.

the same here, when I try to print lex data (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.

I've tried r43118 in osgeo4w-stack in WinVista32:

GRASS GIS compilation log
-------------------------
Started compilation: Sun Aug 15 05:28:47 GMT 2010
--
Errors in:
/c/osgeo4w/usr/src/grass_trunk/lib/vector/diglib
/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes

I get now a different error message than the first report

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'
make[1]: `date.py' is up to date.
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_gis.7.0.svn -lintl  -lintl /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/gis.h /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/gisdefs.h -o grass.py
Status: Preprocessing c:\users\syringia\appdata\local\temp\tmpfflpih.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/tmpfflpih.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/tmpfflpih.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\gis.h:28:26: grass/config.h: No such file or directory
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\gis.h:29:28: grass/datetime.h: No such file or directory
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\gis.h:387:27: grass/gisdefs.h: No such file or directory
Status: Parsing c:\users\syringia\appdata\local\temp\tmpfflpih.h
Error: c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-mingw32\\include\\grass\\gis.h:370: Syntax error at 'DateTime'
Error: c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-mingw32\\include\\grass\\gis.h:370: Syntax error at ';'
Error: c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-mingw32\\include\\grass\\gis.h:372: Syntax error at '}'
Error: c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-mingw32\\include\\grass\\gisdefs.h:478: Syntax error at 'STRUCT_STAT'
Error: c:\\osgeo4w\\usr\\src\\grass_trunk\\dist.i686-pc-mingw32\\include\\grass\\gisdefs.h:479: Syntax error at 'STRUCT_STAT'
Status: Processing description list.
Warning: Could not load library "intl". Okay, I'll try to load it at runtime instead. 
Warning: Could not load library "intl". Okay, I'll try to load it at runtime instead. 
Warning: Member "def" of Struct "Option" has been renamed to "_def" because it has the same name as a Python keyword.
Warning: Could not parse macro "#define serialize_int32_le(buf,x) do { ( buf ) [ i0 ] = ( ( x ) >> i0 ) & i255 ; ( buf ) [ i1 ] = ( ( x ) >> i8 ) & i255 ; ( buf ) [ i2 ] = ( ( x ) >> i16 ) & i255 ; ( buf ) [ i3 ] = ( ( x ) >> i24 ) & i255 ; } while ( i0 )"
Warning: Could not parse macro "#define serialize_int32_be(buf,x) do { ( buf ) [ i0 ] = ( ( x ) >> i24 ) & i255 ; ( buf ) [ i1 ] = ( ( x ) >> i16 ) & i255 ; ( buf ) [ i2 ] = ( ( x ) >> i8 ) & i255 ; ( buf ) [ i3 ] = ( ( x ) >> i0 ) & i255 ; } while ( i0 )"
Status: Writing to grass.py.
Traceback (most recent call last):
  File "./ctypesgen.py", line 140, in <module>
    ctypesgencore.printer.WrapperPrinter(options.output,options,descriptions)
  File "c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\printer\printer.py", line 51, in __init__
    method_table[kind](desc)
  File "c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\printer\printer.py", line 156, in print_constant
    (constant.name,constant.value.py_string(False)),
  File "c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\expressions.py", line 72, in py_string
    if self.value == float('inf'):
ValueError: invalid literal for float(): inf
make[1]: *** [grass.py] Error 1
make[1]: Leaving directory `/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make: *** [default] Error 2

r43118 includes also the fixes from Markus M for the large file support-windows issue and lfs is enabled.

Helmut

comment:21 in reply to:  20 ; Changed 10 years ago by glynn

Replying to hellik:

I get now a different error message than the first report

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\gis.h:28:26: grass/config.h: No such file or directory

I think that I've fixed this with r43120, which invokes the preprocessor via sh.exe. This is the only way I can find to get the -I switches to be recognised. Using Windows pathnames in the Platform.make doesn't work because $PATH doesn't like colons in filenames.

Warning: Could not load library "intl". Okay, I'll try to load it at runtime instead. 

Ugh. ctypesgen can't handle the -lintl flag, as it's an import library (libintl.dll.a); the actual DLL is libintl3.dll. r43121 adds a workaround for this.

comment:22 in reply to:  21 ; Changed 10 years ago by hellik

Replying to glynn:

Replying to hellik:

I get now a different error message than the first report

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\gis.h:28:26: grass/config.h: No such file or directory

I think that I've fixed this with r43120, which invokes the preprocessor via sh.exe. This is the only way I can find to get the -I switches to be recognised. Using Windows pathnames in the Platform.make doesn't work because $PATH doesn't like colons in filenames.

Warning: Could not load library "intl". Okay, I'll try to load it at runtime instead. 

Ugh. ctypesgen can't handle the -lintl flag, as it's an import library (libintl.dll.a); the actual DLL is libintl3.dll. r43121 adds a workaround for this.

I'm a little bit confused now by the many changes in the last times (for example http://lists.osgeo.org/pipermail/grass-commit/2010-August/014079.html, etc.).

how can I test the fixes mentioned above?

I've compiled grass70 in the osgeo4w-stack without any error (lfs manually unset, osgeo4w/gdal16 used) in WinVista32, built a WinGrass7-installer and installed it.

There is only the tcltk-nviz available. Is there any change to test the fixes for example r43120 and r43121.

Helmut

comment:23 in reply to:  22 ; Changed 10 years ago by glynn

Replying to hellik:

There is only the tcltk-nviz available. Is there any change to test the fixes for example r43120 and r43121.

Both of those changes affect the building of the wrappers. They should fix the Windows build-time errors which prevented usable wrappers from being generated (you still get some errors about __asm__ and similar, but those don't matter).

r43120 should fix the 'grass/config.h: No such file or directory' (etc) errors, while r43121 should fix the 'Could not load library "intl"' warnings (which will result in errors at runtime).

Currently, the only available test for the wrappers is the wx nviz module, although that could fail on Windows for reasons unrelated to ctypes (e.g. issues with the underlying OpenGL support).

comment:24 in reply to:  23 ; Changed 10 years ago by hellik

Replying to glynn:

Replying to hellik:

There is only the tcltk-nviz available. Is there any change to test the fixes for example r43120 and r43121.

Both of those changes affect the building of the wrappers. They should fix the Windows build-time errors which prevented usable wrappers from being generated (you still get some errors about __asm__ and similar, but those don't matter).

r43120 should fix the 'grass/config.h: No such file or directory' (etc) errors, while r43121 should fix the 'Could not load library "intl"' warnings (which will result in errors at runtime).

Currently, the only available test for the wrappers is the wx nviz module, although that could fail on Windows for reasons unrelated to ctypes (e.g. issues with the underlying OpenGL support).

What I have done now for testing of r43120 and r43121 in the osgeo4w-stack in WinVista32 is (I hope it's right the way?), is revert r43132

Author: martinl
Date: 2010-08-16 07:20:46 +0000 (Mon, 16 Aug 2010)
New Revision: 43132

Modified:
   grass/trunk/lib/python/Makefile
Log:
disable swig, reenable when #1125 is fixed

Modified: grass/trunk/lib/python/Makefile
===================================================================
--- grass/trunk/lib/python/Makefile	2010-08-16 06:56:47 UTC (rev 43131)
+++ grass/trunk/lib/python/Makefile	2010-08-16 07:20:46 UTC (rev 43132)
@@ -13,10 +13,14 @@
 PYFILES := $(patsubst %,$(DSTDIR)/%.py,$(MODULES) __init__)
 PYCFILES := $(patsubst %,$(DSTDIR)/%.pyc,$(MODULES) __init__)
 
-CLEAN_SUBDIRS = ctypes
+ifeq ($(MINGW),)
+	CLEAN_SUBDIRS = ctypes
+endif
 
 default: $(PYFILES) $(PYCFILES) $(GDIR)/__init__.py $(GDIR)/__init__.pyc
+ifeq ($(MINGW),)
 	-$(MAKE) -C ctypes || echo $(CURDIR)/ctypes >> $(ERRORLOG)
+endif
 
 $(PYDIR):
 	$(MKDIR) $@

and try if there are compiling errors.

GRASS GIS compilation log
-------------------------
Started compilation: Thu Aug 19 16:27:16 GMT 2010
--
Errors in:
No errors detected.
--
Finished compilation: Thu Aug 19 17:17:48 GMT 2010

so there seems to be no errors in compiling of grass70 in the osgeo4w-stack in my WinVista32 (beside the lfs-issue solved by changing manually plattform.make).

but as far as I can remember (correctly?), wx-nviz (3d-view-mode) is disabled at the moment in the WinGrass70-wxgui if a windows-platform is recognized.

3D view mode not available                                                      
Reason: No module named lib.grass                                               
Note that the 3D view mode is currently not working under MS
Windows (hopefully this will be fixed soon). Please keep an
eye out for updated versions of GRASS.

what have I to do that I can test if - after Glynn's fixes with r43120 and r43121 - the wx-nviz-module is working in WinGrass7 after no compiling errors?

best regards Helmut

comment:25 in reply to:  24 ; Changed 10 years ago by glynn

Replying to hellik:

What I have done now for testing of r43120 and r43121 in the osgeo4w-stack in WinVista32 is (I hope it's right the way?), is revert r43132

Right; r43132 is bogus. The fact that ctypes generates errors is no reason to disable it. Errors in ctypes shouldn't prevent anything else from working (if it causes problems for the wxGUI, the bug is that wxnviz is part of the wxGUI process rather than a separate program).

and try if there are compiling errors.

Errors in:
No errors detected.

Good.

but as far as I can remember (correctly?), wx-nviz (3d-view-mode) is disabled at the moment in the WinGrass70-wxgui if a windows-platform is recognized.

3D view mode not available                                                      
Reason: No module named lib.grass                                               

This error occurs if the ctypes wrappers didn't get built. Specifically, it indicates that:

from grass.lib.grass import *

failed.

what have I to do that I can test if - after Glynn's fixes with r43120 and r43121 - the wx-nviz-module is working in WinGrass7 after no compiling errors?

First, check that the $GISBASE/etc/python/grass/lib/*.py files exist. If not, check the build output relating to lib/python/ctypes.

comment:26 in reply to:  25 ; Changed 10 years ago by hellik

Replying to glynn:

First, check that the $GISBASE/etc/python/grass/lib/*.py files exist.

it seems the folder $GISBASE/etc/python/grass/lib/, only a script-folder doesn't exists, but see below:

 Verzeichnis von C:\OSGeo4W\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass

19.08.2010  18:36 <DIR> .
19.08.2010  18:36 <DIR> ..
19.08.2010  18:36 <DIR> script
19.08.2010  18:36 143 __init__.py
19.08.2010  18:36 384 __init__.pyc

and if I go into the script folder, there are:

  Verzeichnis von C:\OSGeo4W\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script

19.08.2010  18:36 <DIR> .
19.08.2010  18:36 <DIR> ..
19.08.2010  18:36 2.244 array.py
19.08.2010  18:36 3.342 array.pyc
19.08.2010  18:36 23.784 core.py
19.08.2010  18:36 29.081 core.pyc
19.08.2010  18:36 3.135 db.py
19.08.2010  18:36 3.530 db.pyc
19.08.2010  18:36 2.534 raster.py
19.08.2010  18:36 3.170 raster.pyc
19.08.2010  18:36 6.132 vector.py
19.08.2010  18:36 6.563 vector.pyc
19.08.2010  18:36 88 __init__.py
19.08.2010  18:36 274 __init__.pyc

comment:27 in reply to:  25 ; Changed 10 years ago by hellik

Replying to glynn:

[...] If not, check the build output relating to lib/python/ctypes.

I can't find anything relating to lib/python/ctypes in the build output, but maybe I've overlooked something. So I will provide the build output.

best regards Helmut

Changed 10 years ago by hellik

Attachment: package.zip added

build output

comment:28 in reply to:  26 Changed 10 years ago by hellik

Replying to hellik:

Replying to glynn:

First, check that the $GISBASE/etc/python/grass/lib/*.py files exist.

it seems the folder $GISBASE/etc/python/grass/lib/, only a script-folder doesn't exists, but see below:

it should be:

it seems the folder $GISBASE/etc/python/grass/lib/ doesn't exist, only a script-folder exists, but see below:

Helmut

comment:29 in reply to:  27 ; Changed 10 years ago by glynn

Replying to hellik:

I can't find anything relating to lib/python/ctypes in the build output, but maybe I've overlooked something. So I will provide the build output.

It looks as if you didn't manage to revert r43132. Try changing lib/python/Makefile by hand.

comment:30 in reply to:  29 ; Changed 10 years ago by hellik

Replying to glynn:

Replying to hellik:

I can't find anything relating to lib/python/ctypes in the build output, but maybe I've overlooked something. So I will provide the build output.

It looks as if you didn't manage to revert r43132. Try changing lib/python/Makefile by hand.

you're right.

now the following error messages:

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'
make[1]: `date.py' is up to date.
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/apps/gdal-16/include -I/c/OSG eo4W/include -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_gis.7.0 .svn -lintl3   /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/gras s/gis.h /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/gisde fs.h -o grass.py
Status: Preprocessing c:\users\syringia\appdata\local\temp\tmpbttgat.h
Status: gcc -E -I/c/OSGeo4W/apps/gdal-16/include -I/c/OSGeo4W/include -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__inlin e__=" "-D__extension__=" "-D_Bool=uint8_t" "-D__const=const" "-D__asm__(x)=" "- D__asm(x)=" "-DCTYPESGEN=1" c:/users/syringia/appdata/local/temp/tmpbttgat.h
Status: Parsing c:\users\syringia\appdata\local\temp\tmpbttgat.h
Status: Processing description list.
Warning: Member "from" of Struct "DateTime" has been renamed to "_from" because  it has the same name as a Python keyword.
Warning: Member "def" of Struct "Option" has been renamed to "_def" because it  has the same name as a Python keyword.
Warning: Could not parse macro "#define serialize_int32_le(buf,x) do { ( buf )  [ i0 ] = ( ( x ) >> i0 ) & i255 ; ( buf ) [ i1 ] = ( ( x ) >> i8 ) & i255 ; ( b uf ) [ i2 ] = ( ( x ) >> i16 ) & i255 ; ( buf ) [ i3 ] = ( ( x ) >> i24 ) & i25 5 ; } while ( i0 )"
Warning: Could not parse macro "#define serialize_int32_be(buf,x) do { ( buf )  [ i0 ] = ( ( x ) >> i24 ) & i255 ; ( buf ) [ i1 ] = ( ( x ) >> i16 ) & i255 ; (  buf ) [ i2 ] = ( ( x ) >> i8 ) & i255 ; ( buf ) [ i3 ] = ( ( x ) >> i0 ) & i25 5 ; } while ( i0 )"
Status: Writing to grass.py.
Traceback (most recent call last):
  File "./ctypesgen.py", line 140, in <module>
    ctypesgencore.printer.WrapperPrinter(options.output,options,descriptions)
  File "c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\printer\ printer.py", line 51, in __init__
    method_table[kind](desc)
  File "c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\printer\ printer.py", line 156, in print_constant
    (constant.name,constant.value.py_string(False)),
  File "c:\osgeo4w\usr\src\grass_trunk\lib\python\ctypes\ctypesgencore\expressions.py", line 72, in py_string
    if self.value == float('inf'):
ValueError: invalid literal for float(): inf
make[1]: *** [grass.py] Error 1
make[1]: Leaving directory `/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
make: *** [default] Error 2

Glynn:

r43120 should fix the 'grass/config.h: No such file or directory' (etc) errors, while r43121 should fix the 'Could not load library "intl"' warnings (which will result in errors at runtime). 

this two issues are fixed, but there seems though some issues with

ValueError: invalid literal for float(): inf

Helmut

comment:31 in reply to:  30 ; Changed 10 years ago by glynn

Replying to hellik:

this two issues are fixed, but there seems though some issues with

ValueError: invalid literal for float(): inf

Right; this doesn't work in Python 2.5; support for infinity (and NaN) appears to have been added in 2.6.

Try r43167.

comment:32 in reply to:  31 Changed 10 years ago by hellik

Replying to glynn:

Replying to hellik:

this two issues are fixed, but there seems though some issues with

ValueError: invalid literal for float(): inf

Right; this doesn't work in Python 2.5; support for infinity (and NaN) appears to have been added in 2.6.

syringia@NADA /c/osgeo4w/usr/src/grass_trunk
$ python --version
Python 2.5.2

Try r43167.

bingo, I think we've tracked down now all compiling issues related to ctypes on windows.

thanks a lot!

GRASS GIS compilation log
-------------------------
Started compilation: Fri Aug 20 11:45:34 GMT 2010
--
Errors in:
No errors detected.
--
Finished compilation: Fri Aug 20 12:38:22 GMT 2010

and alls *.py-files seems to be created now created in $GISBASE/etc/python/grass/lib/

 Verzeichnis von C:\OSGeo4W\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\lib

20.08.2010  14:40    <DIR>          .
20.08.2010  14:40    <DIR>          ..
20.08.2010  13:55             4.601 arraystats.py
20.08.2010  13:55             2.601 arraystats.pyc
20.08.2010  13:55             9.479 cluster.py
20.08.2010  13:55             4.801 cluster.pyc
20.08.2010  13:55             8.528 ctypes_loader.py
20.08.2010  13:55             8.367 ctypes_loader.pyc
20.08.2010  13:55             2.244 ctypes_preamble.py
20.08.2010  13:55             2.836 ctypes_preamble.pyc
20.08.2010  13:55            24.341 date.py
20.08.2010  13:55             8.827 date.pyc
20.08.2010  13:55           148.410 dbmi.py
20.08.2010  13:55            52.469 dbmi.pyc
20.08.2010  13:55            44.916 display.py
20.08.2010  13:55            18.940 display.pyc
20.08.2010  13:55            95.648 g3d.py
20.08.2010  13:55            38.439 g3d.pyc
20.08.2010  13:55            45.215 gmath.py
20.08.2010  13:55            16.413 gmath.pyc
20.08.2010  13:55           135.030 grass.py
20.08.2010  13:55            49.442 grass.pyc
20.08.2010  13:55            32.655 imagery.py
20.08.2010  13:55            14.188 imagery.pyc
20.08.2010  13:55            21.802 nviz.py
20.08.2010  13:55             9.461 nviz.pyc
20.08.2010  13:55           231.993 ogsf.py
20.08.2010  13:55            84.204 ogsf.pyc
20.08.2010  13:55            12.633 proj.py
20.08.2010  13:55             6.079 proj.pyc
20.08.2010  13:55           147.512 raster.py
20.08.2010  13:55            54.083 raster.pyc
20.08.2010  13:55             9.552 stats.py
20.08.2010  13:55             3.904 stats.pyc
20.08.2010  13:55             3.813 trans.py
20.08.2010  13:55             2.005 trans.pyc
20.08.2010  13:55           187.642 vector.py
20.08.2010  13:55            70.312 vector.pyc
20.08.2010  13:55            32.366 vedit.py
20.08.2010  13:55            21.927 vedit.pyc
20.08.2010  13:55               204 __init__.py
20.08.2010  13:55               542 __init__.pyc

best regards Helmut

comment:33 in reply to:  24 ; Changed 10 years ago by hellik

Replying to hellik:

but as far as I can remember (correctly?), wx-nviz (3d-view-mode) is disabled at the moment in the WinGrass70-wxgui if a windows-platform is recognized.

3D view mode not available                                                      
Reason: No module named lib.grass                                               
Note that the 3D view mode is currently not working under MS
Windows (hopefully this will be fixed soon). Please keep an
eye out for updated versions of GRASS.

now this message isn't there anymore and the 3D-view-mode is now activated in the wxgui.

but the whole wxgui crashes and disappears, but I can start the gui again with g.gui wxpython in the commandline. but maybe it's better to open a new ticket for this wxgui-crash?

Helmut

comment:34 in reply to:  33 ; Changed 10 years ago by hellik

Replying to hellik: [...]

but the whole wxgui crashes and disappears, but I can start the gui again with g.gui wxpython in the commandline. but maybe it's better to open a new ticket for this wxgui-crash?

I've open a ticket for the wxgui-crash (#1134).

so I suggest following:

  • closing this ticket, because ctypes compiles now also on windows
  • after some testing, backport ctypes to grass64/grass65

best regards Helmut

comment:35 in reply to:  34 ; Changed 10 years ago by martinl

Replying to hellik:

so I suggest following:

  • closing this ticket, because ctypes compiles now also on windows

+1

  • after some testing, backport ctypes to grass64/grass65

done in r43219 for grass65, please test. Martin

comment:36 in reply to:  35 Changed 10 years ago by hamish

Replying to martinl:

Replying to hellik:

  • after some testing, backport ctypes to grass64/grass65

done in r43219 for grass65, please test.

fyi raster_example_ctypes.py updated in doc/python/, vector and m.distance.py examples copied over from swig/python/examples/ in trunk but still to be ported to ctypes.

(vector example should be straight forward enough; I don't know enough about ctypes to change the swig+NumPtr? calls in m.distance)

also it would be nice to copy in the numpy example from the wiki(?) and an example of using "from grass.script import *" non-ctypes variations. right now we just say "look in scripts/". Probably some good stuff on the mailing list archives to cut & paste into there.

Hamish

comment:37 in reply to:  35 ; Changed 10 years ago by hellik

Replying to martinl:

Replying to hellik:

so I suggest following:

  • closing this ticket, because ctypes compiles now also on windows

+1

  • after some testing, backport ctypes to grass64/grass65

done in r43219 for grass65, please test. Martin

a quick compiling test of wingrass65 (r43248)

GRASS GIS compilation log
-------------------------
Started compilation: Tue Aug 24 17:18:42 GMT 2010
--
Errors in:
No errors detected.
--
Finished compilation: Tue Aug 24 18:33:28 GMT 2010

and all files seems to be build in C:\OSGeo4W\usr\src\grass6_devel\dist.i686-pc-mingw32\etc\python\grass\lib

but during wingrass65-startup I get:

3D view mode not available                                                      
Reason: grass_datetime not found.                                               
Note that the 3D view mode is currently not working under MS
Windows (hopefully this will be fixed soon). Please keep an
eye out for updated versions of GRASS.

best regards Helmut

comment:38 in reply to:  37 Changed 10 years ago by hamish

Replying to hellik:

 3D view mode not available                                                      
 Reason: grass_datetime not found.                                               
 Note that the 3D view mode is currently not working under MS
 Windows (hopefully this will be fixed soon). Please keep an
 eye out for updated versions of GRASS.

fwiw I also see this "MS Windows" message in linux.

Hamish

comment:39 in reply to:  37 ; Changed 10 years ago by glynn

Replying to hellik:

and all files seems to be build in C:\OSGeo4W\usr\src\grass6_devel\dist.i686-pc-mingw32\etc\python\grass\lib

but during wingrass65-startup I get:

3D view mode not available                                                      
Reason: grass_datetime not found.                                               

Is ctypes being invoked with -lgrass_datetime.7.0.svn or -lgrass_datetime?

Check that $GISBASE/etc/python/grass/lib/date.py has:

_libs["grass_datetime.7.0.svn"] = load_library("grass_datetime.7.0.svn")

Also, check that you don't have an old version lying around.

comment:40 in reply to:  39 ; Changed 10 years ago by martinl

Replying to glynn:

and all files seems to be build in C:\OSGeo4W\usr\src\grass6_devel\dist.i686-pc-mingw32\etc\python\grass\lib

but during wingrass65-startup I get:

3D view mode not available                                                      
Reason: grass_datetime not found.                                               

Is ctypes being invoked with -lgrass_datetime.7.0.svn or -lgrass_datetime?

Check that $GISBASE/etc/python/grass/lib/date.py has:

_libs["grass_datetime.7.0.svn"] = load_library("grass_datetime.7.0.svn")

Also, check that you don't have an old version lying around.

Helmut is refering to GRASS 6.5 which uses versioned/unversioned libs. The solution could be to adopt build system in GRASS 6.5 to use only versioned libs as in GRASS 7.

comment:41 in reply to:  40 Changed 10 years ago by hellik

Replying to martinl:

Replying to glynn:

and all files seems to be build in C:\OSGeo4W\usr\src\grass6_devel\dist.i686-pc-mingw32\etc\python\grass\lib

but during wingrass65-startup I get:

3D view mode not available                                                      
Reason: grass_datetime not found.                                               

Is ctypes being invoked with -lgrass_datetime.7.0.svn or -lgrass_datetime?

Check that $GISBASE/etc/python/grass/lib/date.py has:

_libs["grass_datetime.7.0.svn"] = load_library("grass_datetime.7.0.svn")

Also, check that you don't have an old version lying around.

Helmut is refering to GRASS 6.5 which uses versioned/unversioned libs. The solution could be to adopt build system in GRASS 6.5 to use only versioned libs as in GRASS 7.

You're right.

wingrass65: C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\python\grass\lib\date.py

_libs["grass_datetime"] = load_library("grass_datetime")

Helmut

comment:42 in reply to:  40 ; Changed 10 years ago by glynn

Replying to martinl:

Helmut is refering to GRASS 6.5 which uses versioned/unversioned libs.

Right. So it's linking against the unversioned lib but only installing the versioned one?

The solution could be to adopt build system in GRASS 6.5 to use only versioned libs as in GRASS 7

Another alternative is to just keep both versions.

It may be possible to make lib/python/ctypes/Makefile use the versioned name, e.g.:

-	$$(call run_grass,$(CTYPESGEN) $(CTYPESFLAGS) $$($(1)_LIBS) $$($(1)_INC) $(EXTRA_LIBS) $$($(1)_DEPS) -o $$@)
+	$$(call run_grass,$(CTYPESGEN) $(CTYPESFLAGS) $$(patsubst -lgrass_%,-lgrass_%.$(GRASS_VERSION_NUMBER),$$($(1)_LIBS)) $$($(1)_INC) $(EXTRA_LIBS) $$($(1)_DEPS) -o $$@)

comment:43 in reply to:  42 ; Changed 10 years ago by martinl

Replying to glynn:

Replying to martinl:

Helmut is refering to GRASS 6.5 which uses versioned/unversioned libs.

Right. So it's linking against the unversioned lib but only installing the versioned one?

both are build

ls -l /osgeo4w/usr/src/grass6_devel/dist.i686-pc-mingw32/lib/
total 53915
-rwxr-xr-x 1 landa Administrators  497499 Aug 26 01:39 libgrass_I.6.5.svn.dll
-rwxr-xr-x 1 landa Administrators  497499 Aug 26 01:39 libgrass_I.dll

but installed only versioned

ls -l /osgeo4w/bin/libgrass_*6.5*
-rwxr-xr-x 1 landa Administrators  497499 Aug 26 01:39 /osgeo4w/bin/libgrass_I.6.5.svn.dll
-rwxr-xr-x 1 landa Administrators  421054 Aug 26 01:41 /osgeo4w/bin/libgrass_arraystats.6.5.svn.dll
-rwxr-xr-x 1 landa Administrators  405744 Aug 26 01:39 /osgeo4w/bin/libgrass_bitmap.6.5.svn.dll

Another alternative is to just keep both versions.

shouldn't be versioned version enough?

comment:44 in reply to:  43 Changed 10 years ago by glynn

Replying to martinl:

Another alternative is to just keep both versions.

shouldn't be versioned version enough?

Currently, everything uses the unversioned name when linking. But the libraries are built using the versioned name then symlinked to the unversioned name (on Windows, "ln -s" actually makes a copy). On Windows, this causes the versioned name to be embedded in the DLL, and this name is preserved when creating the copy. When linking against the DLL, the program remembers the name which is embedded in the DLL, not the name used in the -l switch, so the program actually depends upon the versioned DLL.

OTOH, none of this applies to ctypesgen, which uses the name given in a -l switch as the name of the library which should be loaded at run-time.

If you want to use only unversioned libraries, you need to modify Shlib.make to create the DLL with the unversioned name. Copying or renaming the DLL won't work.

comment:45 in reply to:  35 Changed 9 years ago by hellik

Resolution: fixed
Status: newclosed

Replying to martinl:

Replying to hellik:

so I suggest following:

  • closing this ticket, because ctypes compiles now also on windows

+1

closing the ticket after more than one year of successful testing. reopen if needed.

Helmut

Note: See TracTickets for help on using tickets.