After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706462 - parse: fix build with Bison 3
parse: fix build with Bison 3
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.0.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 705401 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-21 07:25 UTC by Kerrick Staley
Modified: 2013-09-05 16:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to support Bison 3 (820 bytes, patch)
2013-08-21 07:27 UTC, Kerrick Staley
committed Details | Review
Run of valgrind as requested (3.55 KB, application/octet-stream)
2013-08-21 14:49 UTC, Bruce Dubbs
  Details

Description Kerrick Staley 2013-08-21 07:25:59 UTC
gstreamer needs to be patched slightly to build with Bison 3.
Comment 1 Kerrick Staley 2013-08-21 07:27:08 UTC
Created attachment 252504 [details] [review]
Patch to support Bison 3
Comment 2 Edward Hervey 2013-08-21 07:59:00 UTC
When was YYLEX_PARAM first marked as deprecated ? We need to make sure we still build with not-too-old bison also.
Comment 3 Tim-Philipp Müller 2013-08-21 09:04:18 UTC
*** Bug 705401 has been marked as a duplicate of this bug. ***
Comment 4 Tim-Philipp Müller 2013-08-21 09:06:40 UTC
Many thanks for the patch!

 commit bd2a01cfe222367493a71f3269f12250c8972db0
 Author: Kerrick Staley <kerrick@kerrickstaley.com>
 Date:   Tue Aug 20 23:59:29 2013 -0700

    parse: make grammar.y work with Bison 3
    
    YYLEX_PARAM is no longer supported in Bison 3.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706462

It works fine for me with bison 2.5 as well, and googling finds references to 'why was YYLEX_PARAM deprecated' and 'lex-param' from 2003, so it looks like it should be alright :)
Comment 5 Bruce Dubbs 2013-08-21 13:25:21 UTC
I applied the patch and the build completed without error, but running 

gdb ./tools/.libs/gst-launch-1.0

resulted in a segmentation fault:

(gdb) bt
  • #0 priv_gst_parse_yylex
    at lex.priv_gst_parse_yy.c line 1157
  • #1 priv_gst_parse_yyparse
    at grammar.tab.c line 1809
  • #2 priv_gst_parse_launch
    at ./grammar.y line 938
  • #3 gst_parse_launch_full
    at gstparse.c line 324
  • #4 gst_parse_launchv_full
    at gstparse.c line 262
  • #5 gst_parse_launchv
    at gstparse.c line 215
  • #6 main
    at gst-launch.c line 996


Yes, the command should have some parameters, but not having any should error out, not segfault.  The same test using Bison 2.7 works properly.
Comment 6 Tim-Philipp Müller 2013-08-21 13:59:01 UTC
Could you run:

  $ GST_CHECKS=test_launch_lines make -C tests/check/ pipelines/parse-launch.valgrind

from the top-level gstreamer directory?
Comment 7 Bruce Dubbs 2013-08-21 14:49:39 UTC
Created attachment 252606 [details]
Run of valgrind as requested

Failure with Bison-3.0. 

GST_CHECKS=test_launch_lines make -C tests/check/ pipelines/parse-launch.valgrind

Final result was:

make: *** [pipelines/parse-launch.valgrind] Error 1
Comment 8 Bruce Dubbs 2013-08-21 14:54:44 UTC
Well, that was a challenge. I didn't have valgrind on my system.  I went out and retrieved the valgrind source and tried to build it, but it only supports glibc versions 2.2 - 2.16.  Even the tip of their svn tree only supports 2.17.  

I'm running glibc-2.18. Modifying configure allowed valgrind to build.

The target gstreamer is 1.0.9.  I had to rerun ./configure && make to get it to recognize valgrind, but the results are attached.
Comment 9 Tim-Philipp Müller 2013-08-21 15:05:55 UTC
Thanks for the effort. valgrind is a great tool to have installed if you're doing C/C++ development.

The test seems to pass for our purposes.

Does a simple 'make check' pass?
Comment 10 Bruce Dubbs 2013-08-21 15:17:57 UTC
Yes, 'make check' gives:

==================
All 8 tests passed
==================

I guess the segfault of gst-launch-1.0 with no parameters is a lower priority, but it should be addressed.  There may be a latent problem behind that.
Comment 11 Tim-Philipp Müller 2013-08-21 15:33:12 UTC
Oh, I was missing the fact that it was an empty pipeline :)

Let's create another bug for that then and keep this one closed.
Comment 12 Tim-Philipp Müller 2013-08-26 13:10:02 UTC
Cherry-picked into 1.0 branch.
Comment 13 WorMzy Tykashi 2013-09-05 14:49:37 UTC
Apologies for bumping a Closed/Fixed bug report, but will this fix be backported to 0.10, which is also affected?

Thank you.
Comment 14 Tim-Philipp Müller 2013-09-05 16:15:42 UTC
I have cherry-picked this into the 0.10 branch now. In general 0.10 is pretty much abandoned and unmaintained, however.