[GRASS-dev] [GRASS GIS] #3331: ctypes: ValueError: invalid literal for int() with base 8: '08420217248550443400745280086994171'

GRASS GIS trac at osgeo.org
Tue Jun 6 13:40:21 PDT 2017


#3331: ctypes: ValueError: invalid literal for int() with base 8:
'08420217248550443400745280086994171'
--------------------------+----------------------------
  Reporter:  neteler      |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.2.2
 Component:  Python       |    Version:  unspecified
Resolution:               |   Keywords:  ctypes, python
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+----------------------------

Comment (by neteler):

 I installed Fedora26 (alpha) in docker in order to reproduce the problem
 locally:


 {{{
 [root at f1e5cbaaed18 ctypes]# make
 make /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib
 make[1]: Entering directory
 '/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes'
 make[1]: '/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/etc/python/grass/lib' is up to date.
 make[1]: Leaving directory
 '/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes'
 make OBJ.x86_64-pc-linux-gnu/date.py OBJ.x86_64-pc-linux-gnu/gis.py
 OBJ.x86_64-pc-linux-gnu/raster.py OBJ.x86_64-pc-linux-gnu/gmath.py
 OBJ.x86_64-pc-linux-gnu/proj.py OBJ.x86_64-pc-linux-gnu/imagery.py
 OBJ.x86_64-pc-linux-gnu/vector.py OBJ.x86_64-pc-linux-gnu/rtree.py
 OBJ.x86_64-pc-linux-gnu/display.py OBJ.x86_64-pc-linux-gnu/stats.py
 OBJ.x86_64-pc-linux-gnu/dbmi.py OBJ.x86_64-pc-linux-gnu/raster3d.py
 OBJ.x86_64-pc-linux-gnu/arraystats.py OBJ.x86_64-pc-linux-gnu/cluster.py
 OBJ.x86_64-pc-linux-gnu/vedit.py OBJ.x86_64-pc-linux-gnu/segment.py
 OBJ.x86_64-pc-linux-gnu/rowio.py OBJ.x86_64-pc-linux-gnu/temporal.py
 OBJ.x86_64-pc-linux-gnu/ogsf.py OBJ.x86_64-pc-linux-gnu/nviz.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/date.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/gis.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/raster.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/gmath.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/proj.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/imagery.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/vector.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/rtree.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/display.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/stats.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/dbmi.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/raster3d.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/arraystats.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/cluster.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/vedit.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/segment.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/rowio.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/temporal.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/ogsf.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/nviz.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/__init__.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/ctypes_preamble.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/ctypes_loader.py
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/date.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/gis.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/raster.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/gmath.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/proj.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/imagery.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/vector.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/rtree.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/display.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/stats.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/dbmi.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/raster3d.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/arraystats.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/cluster.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/vedit.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/segment.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/rowio.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/temporal.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/ogsf.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/nviz.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/__init__.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/ctypes_preamble.pyc
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/ctypes_loader.pyc
 make[1]: Entering directory
 '/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes'
 GISRC=/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/demolocation/.grassrc72
 GISBASE=/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu PATH="/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/bin:/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/bin:/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/scripts:$PATH"
 PYTHONPATH="/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-
 gnu/etc/python:/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/gui/wxpython:$PYTHONPATH"
 LD_LIBRARY_PATH="/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64
 -pc-linux-gnu/bin:/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64
 -pc-linux-gnu/bin:/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64
 -pc-linux-
 gnu/scripts:/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/lib:/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/lib:" LC_ALL=C LANG=C LANGUAGE=C ./ctypesgen.py --cpp "gcc -E
 -I/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/include -I/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/include -D__GLIBC_HAVE_LONG_LONG" -lgrass_datetime.7.2.2svn
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/include/grass/datetime.h
 /root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/include/grass/defs/datetime.h -o OBJ.x86_64-pc-linux-gnu/date.py
 Status: Preprocessing /tmp/tmpS5OAMT.h
 Status: gcc -E
 -I/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-linux-
 gnu/include -I/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/include -D__GLIBC_HAVE_LONG_LONG -U __GNUC__ -dD "-Dinline="
 "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t" "-D__const=const"
 "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1" /tmp/tmpS5OAMT.h
 Traceback (most recent call last):
   File "./ctypesgen.py", line 139, in <module>
     descriptions = ctypesgencore.parser.parse(options.headers, options)
   File
 "/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes/ctypesgencore/parser/__init__.py",
 line 22, in parse
     parser.parse()
   File
 "/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py",
 line 74, in parse
     ctypesparser.CtypesParser.parse(self, fname, None)
   File
 "/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes/ctypesgencore/parser/cparser.py",
 line 120, in parse
     self.preprocessor_parser.parse(filename)
   File
 "/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes/ctypesgencore/parser/preprocessor.py",
 line 218, in parse
     token = self.lexer.token()
   File
 "/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes/ctypesgencore/parser/preprocessor.py",
 line 63, in token
     result = lex.Lexer.token(self)
   File
 "/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes/ctypesgencore/parser/lex.py",
 line 355, in token
     newtok = func(tok)
   File
 "/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes/ctypesgencore/parser/pplexer.py",
 line 262, in t_ANY_int
     g1 = str(long(g1, 8))
 ValueError: invalid literal for int() with base 8:
 '08420217248550443400745280086994171'
 make[1]: *** [Makefile:102: OBJ.x86_64-pc-linux-gnu/date.py] Error 1
 make[1]: Leaving directory
 '/root/grass-7.2.svn_src_snapshot_2017_06_03/lib/python/ctypes'
 make: *** [Makefile:81: default] Error 2


 [root at f1e5cbaaed18 ctypes]# cat /tmp/tmpS5OAMT.h
 #include "/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/include/grass/datetime.h"
 #include "/root/grass-7.2.svn_src_snapshot_2017_06_03/dist.x86_64-pc-
 linux-gnu/include/grass/defs/datetime.h"
 }}}

 I wonder if the "-D_Bool=uint8_t" above matters here?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3331#comment:5>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list