Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592770 - sys-devel/flex-2.5.39-r1 fails tests test-bison-yylloc and test-bison-yylval
Summary: sys-devel/flex-2.5.39-r1 fails tests test-bison-yylloc and test-bison-yylval
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH, TESTFAILURE
Depends on:
Blocks:
 
Reported: 2016-09-03 10:41 UTC by tiage
Modified: 2017-01-23 01:28 UTC (History)
0 users

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


Attachments
upstream patch (flex-2.5.39-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch,2.00 KB, patch)
2016-09-03 10:41 UTC, tiage
Details | Diff
Patch for flex-2.5.39-r1.ebuild (flex-2.5.39.ebuild.patch,342 bytes, patch)
2016-09-03 10:42 UTC, tiage
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tiage 2016-09-03 10:41:21 UTC
Created attachment 444872 [details, diff]
upstream patch

sys-devel/flex-2.5.39-r1 fails its test suite due to deprecated bison constructs.
This is known as upstream bug https://sourceforge.net/p/flex/bugs/169/ and fixed in flex-2.6.0 onwards.

Please apply the patch mentioned in the above bug report to flex-2.5.39 or stabilise flex-2.6.x.
Thx

patch for flex-2.5.39-r1 ebuild:

--- a/sys-devel/flex/flex-2.5.39-r1.ebuild
+++ b/sys-devel/flex/flex-2.5.39-r1.ebuild
@@ -22,6 +22,10 @@
        nls? ( sys-devel/gettext )
        test? ( sys-devel/bison )" 

+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-2.5.39-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch
+}
+
 src_configure() {
        use static && append-ldflags -static

Upstream patch

From 35aba3d6e3c99fcd527c677bef8efeb59963fe8a Mon Sep 17 00:00:00 2001
Message-Id: <35aba3d6e3c99fcd527c677bef8efeb59963fe8a.1397340102.git.srivasta@golden-gryphon.com>
From: Manoj Srivastava <srivasta@golden-gryphon.com>
Date: Wed, 9 Apr 2014 00:23:07 -0700
Subject: [PATCH 1/1] [bison-test-fixes] Do not use obsolete bison constructs in tests.

In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been
removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or
%param. This commit fixes the tests so they still work.

Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
---
 tests/test-bison-yylloc/parser.y | 4 ++--
 tests/test-bison-yylval/parser.y | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
  50.0% tests/test-bison-yylloc/
  50.0% tests/test-bison-yylval/

diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y
index e8f4e56..224d252 100644
--- a/tests/test-bison-yylloc/parser.y
+++ b/tests/test-bison-yylloc/parser.y
@@ -22,6 +22,7 @@
  */

 %parse-param { void* scanner }
+%lex-param { void* scanner }

 /* 
    How to compile:
@@ -34,7 +35,6 @@
 #include "config.h" 

 #define YYERROR_VERBOSE 1
-#define YYLEX_PARAM   scanner

 extern int testget_lineno(void*);

@@ -52,7 +52,7 @@ int process_text(char* s) {

 %}

-%pure_parser
+%pure-parser

 %union  {
     int  lineno;
diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y
index 0ffdb89..626c5e7 100644
--- a/tests/test-bison-yylval/parser.y
+++ b/tests/test-bison-yylval/parser.y
@@ -26,6 +26,7 @@
    bison --defines --output-file="parser.c" --name-prefix="test" parser.y
  */
 %parse-param { void* scanner }
+%lex-param { void* scanner }
 %{
 #include <stdio.h>
 #include <stdlib.h>
@@ -33,7 +34,6 @@
 #include "config.h" 

 #define YYERROR_VERBOSE 1
-#define YYLEX_PARAM   scanner

 /* A dummy function. A check against seg-faults in yylval->str. */
@@ -49,7 +49,7 @@ int process_text(char* s) {

 %}

-%pure_parser
+%pure-parser

 %union  {
     long unused;
-- 
1.9.2
Comment 1 tiage 2016-09-03 10:42:09 UTC
Created attachment 444874 [details, diff]
Patch for flex-2.5.39-r1.ebuild
Comment 2 tiage 2017-01-22 15:38:38 UTC
flex-2.5.x is not shipped in the portage tree any more and flex-2.6.x is stable.
So from my point of view this issue is outdated.