[Mesa-users] Syntax errors building Mesa3D 9.0.2 on Windows (program_parse.tab.c)

Keith Kriewall Keith.Kriewall at Attachmate.com
Fri Feb 15 10:59:34 PST 2013


In the following environment:
  Windows 7 (64-bit)
  Python 2.7.3 (32-bit)
  Scons 2.2.0
  Winflexbison (lex = GNU Flex 2.5.37, yacc =  GNU Bison 2.7)
  MS Dev Studio 2010
  Mesa3D 9.0.2 source

I run 'scons libgl-gdi' and get syntax errors in build\windows-x86-debug\mesa\program\program_parse.tab.c (see clips below).  I'm guessing this is due to my yacc/lex toolset.  Any help getting this to compile would be much appreciated!

Thanks,

-Keith

==== clip of build output
  Generating build\windows-x86-debug\mesa\program\program_parse.tab.c ...
glapi_dispatch.c
  Compiling src\mesa\program\program_parse_extra.c ...
program_parse_extra.c
  Compiling build\windows-x86-debug\mesa\program\program_parse.tab.c ...
program_parse.tab.c
F:\proj\Mesa-9.0.2\src\mapi\glapi/glapitemp.h(4320) : warning C4090: 'function': different 'const' qualifiers
F:\proj\Mesa-9.0.2\src\mapi\glapi/glapitemp.h(5921) : warning C4090: 'function': different 'const' qualifiers
  Compiling src\mesa\program\program.c ...
F:\proj\Mesa-9.0.2\src\mapi\glapi/glapitemp.h(7901) : warning C4090: 'function': different 'const' qualifiers
program.c
  Compiling src\mesa\main\readpix.c ...
readpix.c
  Archiving build\windows-x86-debug\mapi\glapi\glapi.lib ...
build\windows-x86-debug\mesa\program\program_parse.tab.c(1401) : error C2143: syntax error : missing ')' before '('
build\windows-x86-debug\mesa\program\program_parse.tab.c(1401) : error C2091: function returns function
build\windows-x86-debug\mesa\program\program_parse.tab.c(1401) : error C2059: syntax error : ')'
build\windows-x86-debug\mesa\program\program_parse.tab.c(1412) : error C2085: 'yy_location_print_' : not in formal parameter list
build\windows-x86-debug\mesa\program\program_parse.tab.c(1412) : error C2143: syntax error : missing ';' before '{'
build\windows-x86-debug\mesa\program\program_parse.tab.c(1414) : error C2065: 'yylocp' : undeclared identifier
build\windows-x86-debug\mesa\program\program_parse.tab.c(1414) : error C2223: left of '->last_column' must point to struct/union
build\windows-x86-debug\mesa\program\program_parse.tab.c(1414) : error C2065: 'yylocp' : undeclared identifier
build\windows-x86-debug\mesa\program\program_parse.tab.c(1414) : error C2223: left of '->last_column' must point to struct/union
03: unable to recover from previous error(s); stopping compilation
scons: *** [build\windows-x86-debug\mesa\program\program_parse.tab.obj] Error 2
==== end clip

==== clip of program_parse.tab.c source (lines 1401 and 1412 are highlighted blue)
/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL

/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */

__attribute__((__unused__))
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
#else
static unsigned
yy_location_print_ (yyo, yylocp)
    FILE *yyo;
    YYLTYPE const * const yylocp;
#endif
{
  unsigned res = 0;
  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  if (0 <= yylocp->first_line)
    {
      res += fprintf (yyo, "%d", yylocp->first_line);
      if (0 <= yylocp->first_column)
        res += fprintf (yyo, ".%d", yylocp->first_column);
    }
  if (0 <= yylocp->last_line)
    {
      if (yylocp->first_line < yylocp->last_line)
        {
          res += fprintf (yyo, "-%d", yylocp->last_line);
          if (0 <= end_col)
            res += fprintf (yyo, ".%d", end_col);
        }
      else if (0 <= end_col && yylocp->first_column < end_col)
        res += fprintf (yyo, "-%d", end_col);
    }
  return res;
}

#  define YY_LOCATION_PRINT(File, Loc)          \
  yy_location_print_ (File, &(Loc))

# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif
==== end clip

Keith Kriewall
Software Developer
1500 Dexter Ave N
Seattle, WA 98109
206-217-7892
keith.kriewall at attachmate.com
[Description: line]
[Description: Attachmate]<http://www.attachmate.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20130215/55c45e73/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 13330 bytes
Desc: image001.jpg
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20130215/55c45e73/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 2837 bytes
Desc: image002.jpg
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20130215/55c45e73/attachment-0003.jpg>


More information about the mesa-users mailing list