Bug 119373 - webkit-gtk fails to build with bison-3.0
Summary: webkit-gtk fails to build with bison-3.0
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on: 119892
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-31 19:16 PDT by Jeremy Huddleston Sequoia
Modified: 2013-08-16 05:29 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.04 KB, patch)
2013-08-05 12:47 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston Sequoia 2013-07-31 19:16:20 PDT
Reported at https://trac.macports.org/ticket/39923

When using the recently released bison-3.0, webkit-gtk fails to build:

:info:build DerivedSources/ANGLE/glslang_tab.cpp:1785:16: error: no matching function for call to 'yylex'
:info:build       yychar = yylex (&yylval);
:info:build                ^~~~~
:info:build DerivedSources/ANGLE/glslang_tab.cpp:279:12: note: candidate function not viable: requires 2 arguments, but 1 was provided
:info:build extern int yylex(YYSTYPE* yylval_param, void* yyscanner);
:info:build            ^
:info:build 1 error generated.
:info:build make[1]: *** [DerivedSources/ANGLE/libWebCore_la-glslang_tab.lo] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
Comment 1 Zan Dobersek 2013-08-05 01:49:01 PDT
Confirmed.

There are already generated glslang_tab.cpp and glslang_tab.h files in the ANGLE directory, produced by Bison 2.7[1].
The third-party sources have these two files regenerated with Bison 2.3, for Mac port's purposes.
The GTK port regenerates these with the Bison it finds during the configuration. With Bison 3.0, the generated files are causing compilation errors. Could the GTK port switch to building the files that were generated with Bison 2.3, just like the Mac port?

Also, only the GTK port generates and compiles the glslang.cpp file, so this part could possibly be removed.

[1] https://code.google.com/p/angleproject/source/browse/src/compiler/glslang_tab.cpp
Comment 2 Zan Dobersek 2013-08-05 12:47:09 PDT
Created attachment 208140 [details]
Patch
Comment 3 Gustavo Noronha (kov) 2013-08-05 15:29:34 PDT
Comment on attachment 208140 [details]
Patch

LGTM
Comment 4 Zan Dobersek 2013-08-06 05:43:54 PDT
Comment on attachment 208140 [details]
Patch

Clearing flags on attachment: 208140

Committed r153749: <http://trac.webkit.org/changeset/153749>
Comment 5 Zan Dobersek 2013-08-06 05:44:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Allan Sandfeld Jensen 2013-08-14 09:45:52 PDT
I patched glslang.y for bison 3 in bug #119798 so after landing that you might be able to revert this patch.
Comment 7 Zan Dobersek 2013-08-14 10:43:58 PDT
(In reply to comment #6)
> I patched glslang.y for bison 3 in bug #119798 so after landing that you might be able to revert this patch.

Do you perhaps plan to upstream the fix into ANGLE itself?
And thanks for the notice.
Comment 8 Allan Sandfeld Jensen 2013-08-14 11:00:06 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > I patched glslang.y for bison 3 in bug #119798 so after landing that you might be able to revert this patch.
> 
> Do you perhaps plan to upstream the fix into ANGLE itself?
> And thanks for the notice.

I wasn't planning on upstreaming it, but I will take a look now. I was just trying to fix the Qt build in the cleanest possible way.
Comment 9 WebKit Commit Bot 2013-08-16 04:40:34 PDT
Re-opened since this is blocked by bug 119892
Comment 10 Zan Dobersek 2013-08-16 05:29:43 PDT
The revision was merged into the webkit-2.0 branch, but should stay there as the ANGLE third-party source has been updated since the branching, so merging the source generation fix into the branch would be a bit risky.

Closing again.