Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486148 - media-gfx/pixie-2.2.6-r1 fails with bison-3
Summary: media-gfx/pixie-2.2.6-r1 fails with bison-3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL: https://sourceforge.net/p/pixie/bugs/...
Whiteboard:
Keywords:
: 574430 (view as bug list)
Depends on:
Blocks: bison-3-breakage
  Show dependency tree
 
Reported: 2013-09-27 02:12 UTC by Patrick Lauer
Modified: 2016-02-16 21:05 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (1422047340-install-media-gfx_pixie-2.2.6-r1:0::gentoo.out,107.47 KB, text/plain)
2015-01-26 04:15 UTC, cmuelle8
Details
pixie-2.2.6-r1.ebuild.patch (pixie-2.2.6-r1.ebuild.patch,454 bytes, patch)
2015-01-26 04:15 UTC, cmuelle8
Details | Diff
pixie-2.2.6-r1.ebuild (pixie-2.2.6-r1.ebuild,2.79 KB, text/plain)
2015-01-26 04:17 UTC, cmuelle8
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2013-09-27 02:12:09 UTC
make[4]: Entering directory `/var/tmp/portage/media-gfx/pixie-2.2.6-r1/work/Pixie/src/sdr'
/bin/sh ../../libtool --tag=CXX   --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I..    -O2 -pipe -march=native -MT sdr.lo -MD -MP -MF .deps/sdr.Tpo -c -o sdr.lo sdr.cpp
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I.. -O2 -pipe -march=native -MT sdr.lo -MD -MP -MF .deps/sdr.Tpo -c sdr.cpp  -fPIC -DPIC -o .libs/sdr.o
sdr.cpp:203:15: error: stray '#' in program
 typedef union #line 58 "sdr.y" /* yacc.c:355  */
               ^
sdr.cpp:206:7: error: stray '#' in program
 union #line 58 "sdr.y" /* yacc.c:355  */
       ^
sdr.cpp:203:21: error: expected unqualified-id before numeric constant
 typedef union #line 58 "sdr.y" /* yacc.c:355  */
                     ^
sdr.cpp:206:13: error: expected unqualified-id before numeric constant
 union #line 58 "sdr.y" /* yacc.c:355  */
             ^
sdr.cpp:225:8: error: 'YYSTYPE' does not name a type
 extern YYSTYPE sdrlval;
        ^
sdr.cpp:401:3: error: 'YYSTYPE' does not name a type
   YYSTYPE yyvs_alloc;
   ^
sdr.cpp:1242:44: error: 'YYSTYPE' has not been declared
 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
                                            ^
sdr.cpp:1261:1: error: 'YYSTYPE' does not name a type
 YYSTYPE yylval;
 ^
sdr.cpp: In function 'int sdrparse()':
sdr.cpp:1290:5: error: 'YYSTYPE' was not declared in this scope
     YYSTYPE yyvsa[YYINITDEPTH];
     ^
sdr.cpp:1290:13: error: expected ';' before 'yyvsa'
     YYSTYPE yyvsa[YYINITDEPTH];
             ^
sdr.cpp:1291:14: error: 'yyvs' was not declared in this scope
     YYSTYPE *yyvs;
              ^
sdr.cpp:1292:14: error: 'yyvsp' was not declared in this scope
     YYSTYPE *yyvsp;
              ^
sdr.cpp:1302:11: error: expected ';' before 'yyval'
   YYSTYPE yyval;
           ^
sdr.cpp:1318:18: error: 'yyvsa' was not declared in this scope
   yyvsp = yyvs = yyvsa;
                  ^
sdr.cpp:1383:27: error: 'union yyalloc' has no member named 'yyvs_alloc'
         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
                           ^
sdr.cpp:439:25: note: in definition of macro 'YYCOPY'
       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
                         ^
sdr.cpp:1383:9: note: in expansion of macro 'YYSTACK_RELOCATE'
         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
         ^
sdr.cpp:1383:27: error: 'union yyalloc' has no member named 'yyvs_alloc'
         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
                           ^
sdr.cpp:425:25: note: in definition of macro 'YYSTACK_RELOCATE'
         Stack = &yyptr->Stack_alloc;                                    \
                         ^
sdr.cpp:69:25: error: 'sdrlval' was not declared in this scope
 #define yylval          sdrlval
                         ^
sdr.cpp:1468:14: note: in expansion of macro 'yylval'
   *++yyvsp = yylval;
              ^
sdr.cpp:1499:3: error: 'yyval' was not declared in this scope
   yyval = yyvsp[1-yylen];
   ^
sdr.l: In function 'int sdrlex()':
sdr.cpp:69:25: error: 'sdrlval' was not declared in this scope
 #define yylval          sdrlval
                         ^
sdr.l:40:12: note: in expansion of macro 'yylval'
 \"[^\"]*\"           {   strcpy(yylval.string,&yytext[1]); yylval.string[strlen(yylval.string)-1] = '\0'; osProcessEscapes(yylval.string); return SCRL_TEXT_VALUE;}
            ^
sdr.cpp:69:25: error: 'sdrlval' was not declared in this scope
 #define yylval          sdrlval
                         ^
sdr.l:41:10: note: in expansion of macro 'yylval'
 [a-zA-Z\_][a-zA-Z0-9\_]*       { strcpy(yylval.string,yytext); return SCRL_IDENTIFIER_VALUE; }
          ^
sdr.cpp:69:25: error: 'sdrlval' was not declared in this scope
 #define yylval          sdrlval
                         ^
sdr.l:42:10: note: in expansion of macro 'yylval'
 \#\![a-zA-Z][a-zA-Z0-9\_]*       { strcpy(yylval.string,yytext); return SCRL_LABEL_VALUE; }
          ^
sdr.cpp:69:25: error: 'sdrlval' was not declared in this scope
 #define yylval          sdrlval
                         ^
sdr.l:44:24: note: in expansion of macro 'yylval'
 [+-]?([0-9]+|([0-9]*(\.[0-9]+)?)([eE][+-]?[0-9]+)?) { sscanf(yytext,"%f",&yylval.real); return SCRL_FLOAT_VALUE; }
                        ^
sdr.cpp:69:25: error: 'sdrlval' was not declared in this scope
 #define yylval          sdrlval
                         ^
sdr.l:45:24: note: in expansion of macro 'yylval'
 [+-]?([0-9]+|([0-9]+(\.[0-9]*)?)([eE][+-]?[0-9]+)?) { sscanf(yytext,"%f",&yylval.real); return SCRL_FLOAT_VALUE; }
                        ^
sdr.y: In function 'TSdrShader* sdrGet(const char*, const char*)':
sdr.y:1320:22: warning: format not a string literal and no format arguments [-Wformat-security]
       sprintf(dest,in);
                      ^
make[4]: *** [sdr.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/media-gfx/pixie-2.2.6-r1/work/Pixie/src/sdr'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/media-gfx/pixie-2.2.6-r1/work/Pixie/src/sdr'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-gfx/pixie-2.2.6-r1/work/Pixie/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-gfx/pixie-2.2.6-r1/work/Pixie'
make: *** [all] Error 2
emake failed
 * ERROR: media-gfx/pixie-2.2.6-r1::gentoo failed (compile phase):
 *   emake failed
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-29 11:07:45 UTC
Upstream seems to be dead and I couldn't find a patch for this software elsewhere.
Comment 2 cmuelle8 2015-01-26 04:14:19 UTC
I cannot confirm the above errors.  The sdr parser is generated without an error here.  Toolchain info:

bison (GNU Bison) 3.0.3
flex 2.5.39

But there has been another, speak similar, issue which needed to be tracked down and fixed:


SYMPTOM
In file included from rib.y:2835:0:
rib.l: In function ‘int riblex(YYSTYPE*)’:
rib.l:211:5: error: ‘riblval’ was not declared in this scope
 \"[^\"]*\"           {   riblval->string = rstrdup(ribtext+1,CRenderer::globalMemory); riblval->string[strlen(riblval->string)-1] = '\0'; return RIB_TEXT;}


CURE
If flex or bison are used with the prefix switch '-Prib' then the yy function prefix will be translated to 'example' prefixes, i.e. the utilities will emit
#define yyparse ribparse
#define yylex riblex

and so on to the generated cpp source files.

Current flex however will _not_ translate the variable name 'yylval' to 'riblval' that appears in a custom #define YY_DECL within
  src/ri/rib.l

Judging from the rest of the content in rib.l -- it uses 'riblval' a few times within C code specific to certain token rules -- there seemed to be a time once, when flex actually did do such a translation.

Sed'ing in src_prepare() will fix this single problem - see attached patch.
Comment 3 cmuelle8 2015-01-26 04:15:13 UTC
Created attachment 394912 [details]
build log
Comment 4 cmuelle8 2015-01-26 04:15:42 UTC
Created attachment 394914 [details, diff]
pixie-2.2.6-r1.ebuild.patch
Comment 5 cmuelle8 2015-01-26 04:17:38 UTC
Created attachment 394916 [details]
pixie-2.2.6-r1.ebuild

full ebuild (tested with gcc-4.9.2, bison 3.0.3, flex 2.5.39)
Comment 6 Kristian Fiskerstrand (RETIRED) gentoo-dev 2016-02-16 10:15:01 UTC
*** Bug 574430 has been marked as a duplicate of this bug. ***
Comment 7 dugz 2016-02-16 10:54:15 UTC
Submitted upstream bug report https://sourceforge.net/p/pixie/bugs/139/ linking back to this page.
Comment 8 Kristian Fiskerstrand (RETIRED) gentoo-dev 2016-02-16 21:05:29 UTC
commit d2c4ba06caa43c1d2bfc297a8a4a409f8fdbc174
Author: Kristian Fiskerstrand <k_f@gentoo.org>
Date:   Tue Feb 16 22:11:06 2016 +0100

    media-gfx/pixie: Fix building with bison 3
    
    Bug: 486148
    Thanks-To: cmuelle8
    
    Package-Manager: portage-2.2.27