[GRASS-dev] [GRASS GIS] #4015: ctypes: TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported

GRASS GIS trac at osgeo.org
Wed Jan 8 00:36:15 PST 2020


#4015: ctypes: TypeError: item 1 in _argtypes_ passes a union by value, which is
unsupported
-----------------------------+---------------------------------
 Reporter:  neteler          |      Owner:  grass-dev@…
     Type:  defect           |     Status:  new
 Priority:  normal           |  Milestone:  7.8.3
Component:  Python ctypes    |    Version:  git-releasebranch78
 Keywords:  ctypes, python3  |        CPU:  Unspecified
 Platform:  Unspecified      |
-----------------------------+---------------------------------
 Alpine edge ships Python 3.8.1. When compiling GRASS 7.8 addons like
 i.cutlines (and other) addons, following error occurs:

 {{{
 Default locale settings are missing. GRASS running with C locale.
 Starting GRASS GIS...
 Creating new GRASS GIS location <tmploc>...
 Cleaning up temporary files...
 Executing <g.extension -s extension=i.cutlines> ...
 Fetching <i.cutlines> from GRASS GIS Addons repository (be patient)...
 Compiling...
 Traceback (most recent call last):
   File "/usr/lib/python3.8/ctypes/__init__.py", line 99, in CFUNCTYPE
     return _c_functype_cache[(restype, argtypes, flags)]
 KeyError: (<class 'ctypes.c_int'>, (<class
 'grass.lib.ctypes_preamble.String'>,), 1)

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/tmp/grass7-root-73/tmpumv5zbxd/i.cutlines/scripts/i.cutlines",
 line 171, in <module>
     from grass.pygrass.modules.grid.grid import GridModule
   File
 "/usr/local/grass78/etc/python/grass/pygrass/modules/grid/__init__.py",
 line 2, in <module>
     from grass.pygrass.modules.grid.grid import GridModule
   File "/usr/local/grass78/etc/python/grass/pygrass/modules/grid/grid.py",
 line 12, in <module>
     from grass.pygrass.gis import Mapset, Location
   File "/usr/local/grass78/etc/python/grass/pygrass/gis/__init__.py", line
 13, in <module>
     import grass.lib.gis as libgis
   File "/usr/local/grass78/etc/python/grass/lib/gis.py", line 451, in
 <module>
     ('checker', CFUNCTYPE(UNCHECKED(c_int), String)),
   File "/usr/lib/python3.8/ctypes/__init__.py", line 101, in CFUNCTYPE
     class CFunctionType(_CFuncPtr):
 TypeError: item 1 in _argtypes_ passes a union by value, which is
 unsupported.
 make: *** [/usr/local/grass78/include/Make/Html.make:14:
 i.cutlines.tmp.html] Error 1
 ERROR: Compilation failed, sorry. Please check above error messages.
 Execution of <g.extension -s extension=i.cutlines> finished.
 Cleaning up temporary files...
 }}}

 We used this docker image:

 https://hub.docker.com/r/mundialis/grass-py3-pdal/tags

 -> `docker pull mundialis/grass-py3-pdal:stable-alpine`

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/4015>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list