[GRASS-dev] Re: [GRASS GIS] #308: Compiler error while building python swig

GRASS GIS trac at osgeo.org
Thu Sep 11 01:29:01 EDT 2008


#308: Compiler error while building python swig
----------------------------------+-----------------------------------------
  Reporter:  cgsbob               |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect               |      Status:  new                      
  Priority:  major                |   Milestone:  6.4.0                    
 Component:  SWIG (all bindings)  |     Version:  svn-develbranch6         
Resolution:                       |    Keywords:  python swig              
  Platform:  Unspecified          |         Cpu:  Unspecified              
----------------------------------+-----------------------------------------
Comment (by cgsbob):

 I changed the Makefile with the filter you specified below.  Now there are
 problems with vect.i.

 Replying to [comment:2 glynn]:
 > Replying to [ticket:308 cgsbob]:
 > > While doing a make in swig/python, I get this error:
 >
 > > interfaces/gisdefs.i:116: Error: Syntax error in input(1).
 >
 > > The syntax error in interfaces/gisdefs.i points to this line:
 > >
 > >     __attribute__ ((format(printf, 2, 3)));
 >
 > Right. The Makefile generates gisdefs.i from gisdefs.h, removing the
 declarations of any variadic functions using grep. One of the declarations
 which it removes is G_asprintf(), which has the above __attribute__
 declaration on the following line, so it gets left behind, separated from
 the actual function declaration.
 >
 > I'm guessing that this happened when the file was "indent"ed.
 >
 > A more robust filter is:
 >
 > {{{
 > cat ../../../include/gisdefs.h | sed -e '/\.\.\..*;/d' -e
 '/\.\.\./,/;/d' >> gisdefs.i
 > }}}
 >
 > This removes any declaration containing "..."; if the terminating
 semicolon isn't on the same line, it will remove subsequent lines until it
 finds the semicolon.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/308#comment:3>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list