hello, it seems webkit-gtk will not compile on gentoo with bison 2.4 (downgrading to bison 2.3 works) as in http://pastebin.com/m471f5e34
pastebin is a very bad thing for bugzilla, as it will be invalid shortly. attach build.log, please.
Created attachment 25212 [details] Error building webkit with bison 2.4 installed
It isn't only gentoo. We have the same problem on Sourcemage with Bison 2.4 and webkit. Here is the final error (also attaching complete log): /usr/bin/bison -d -p cssyy WebCore/css/CSSGrammar.y -o ./DerivedSources/CSSGrammar.cpp WebCore/css/CSSGrammar.y:348.11-20: symbol maybe_sgml redefined make: *** [DerivedSources/CSSGrammar.cpp] Error 1
(In reply to comment #2) > Created an attachment (id=25212) [review] > Error building webkit with bison 2.4 installed > gentoo just released bison 2.4-r1, will test tomorrow and report if changes.
I patched with the gentoo patch for R1 and it still fails. Maybe it will work for you.
Here is the response I got on the bison mailing list: > > I have reported a bug with the webkit developers, but thought maybe > > you would have a fix, so I can continue building webkit nightly > > builds and have bison 2.4 installed. Webkit build fine with bison > > 2.3. > > > > It fails very early in the build with this error: > > WebCore/css/CSSGrammar.y:348.11-20: symbol maybe_sgml redefined make: > 334 maybe_sgml: > 335 /* empty */ > 336 | maybe_sgml SGML_CD > 337 | maybe_sgml WHITESPACE > 338 ; > 346 closing_brace: > 347 '}' > 348 | %prec maybe_sgml TOKEN_EOF > 349 ; The argument of %prec must be a token. maybe_sgml is a nonterminal. Bison 2.3 ignored this error. Bison 2.3b and later complain about it. I can't tell for sure what the webkit developers intended here, but removing maybe_sgml from line 348 should make Bison stop complaining. ------------------------------- Removing maybe-sgml from line 348 results in: /usr/bin/bison -d -p cssyy WebCore/css/CSSGrammar.y -o ./DerivedSources/CSSGrammar.cpp WebCore/css/CSSGrammar.y: conflicts:105 shift/reduce, 6 reduce/reduce WebCore/css/CSSGrammar.y: expected 48 shift/reduce conflicts WebCore/css/CSSGrammar.y: expected 0 reduce/reduce conflicts make: *** [DerivedSources/CSSGrammar.cpp] Error 1
I get the same issue on Arch Linux with Bison 2.4 currently in testing.
Also, the Gentoo bug report, fyi: http://bugs.gentoo.org/show_bug.cgi?format=multiple&id=246518
This bug also present on Mac OS X, if you using the Bison 2.4 port.
This bug also appears on Fedora Development ("rawhide") using Bison 2.4 (specifically, bison-2.4-2.fc11).
Confirming the bug and updating its info as it should plague all ports and not only gtk as reported.
*** Bug 22622 has been marked as a duplicate of this bug. ***
Created attachment 25765 [details] fix-bison-incompatibility.patch Created this patch based on discussions in bison-bugs mailinglist. This fixes the build error, but it is so far only compile tested, because I have some linking troubles in JavascriptCore...
This patch fails during the build for me although at a different place. It looks similar to the one I created from the discussions on the bison mailing list. I could never get it to work correct. Here is the failure for me: ./doltlibtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -DWTF_USE_ICU_UNICODE=1 -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1 -DWTF_CHANGES -DXP_UNIX -DNDEBUG -I./WebCore -I./WebCore/bindings/js -I./WebCore/bridge -I./WebCore/bridge/c -I./WebCore/css -I./WebCore/dom -I./WebCore/editing -I./WebCore/history -I./WebCore/html -I./WebCore/inspector -I./WebCore/loader -I./WebCore/loader/appcache -I./WebCore/loader/archive -I./WebCore/loader/icon -I./WebCore/page -I./WebCore/page/animation -I./WebCore/platform -I./WebCore/platform/graphics -I./WebCore/platform/graphics/filters -I./WebCore/platform/image-decoders -I./WebCore/platform/image-decoders/bmp -I./WebCore/platform/image-decoders/gif -I./WebCore/platform/image-decoders/ico -I./WebCore/platform/image-decoders/jpeg -I./WebCore/platform/image-decoders/png -I./WebCore/platform/image-decoders/xbm -I./WebCore/platform/network -I./WebCore/platform/text -I./WebCore/plugins -I./WebCore/rendering -I./WebCore/rendering/style -I./WebCore/xml -I./WebCore/bindings/js -DWTF_USE_CURL=1 -I./WebCore/platform/network/curl -DENABLE_OFFLINE_WEB_APPLICATIONS=1 -DENABLE_DASHBOARD_SUPPORT=1 -DENABLE_DATABASE=1 -I./WebCore/platform/sql -I./WebCore/storage -DENABLE_DOM_STORAGE=1 -I./WebCore/storage -DENABLE_ICONDATABASE=1 -DENABLE_XPATH=1 -DENABLE_XSLT=1 -DENABLE_WORKERS=1 -DENABLE_GEOLOCATION=1 -DENABLE_SVG=1 -I\./WebCore/svg -I\./WebCore/svg/animation -I\./WebCore/svg/graphics -I\./WebCore/svg/graphics/filters -DENABLE_SVG_USE=1 -DENABLE_SVG_FOREIGN_OBJECT=1 -DENABLE_SVG_FONTS=1 -DENABLE_SVG_AS_IMAGE=1 -DENABLE_SVG_ANIMATION=1 -DDATA_DIR=\"/usr/share\" -I./JavaScriptCore -I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/parser -I./JavaScriptCore/wtf -I./DerivedSources -I./JavaScriptCore/API -I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/interpreter -I./JavaScriptCore/bytecode -I./JavaScriptCore/bytecompiler -I./JavaScriptCore/debugger -I./JavaScriptCore/jit -I./JavaScriptCore/pcre -I./JavaScriptCore/profiler -I./JavaScriptCore/runtime -I./JavaScriptCore/wrec -I./JavaScriptCore/jit -I./JavaScriptCore/assembler -I./JavaScriptCore/wtf/unicode -I./JavaScriptCore/pcre -I./JavaScriptCore/parser -I./JavaScriptCore/runtime -I./WebCore/loader/gtk -I./WebCore/page/gtk -I./WebCore/platform/graphics/cairo -I./WebCore/platform/graphics/gtk -I./WebCore/platform/gtk -DUSE_FREETYPE=1 -I./WebCore/svg/graphics/cairo -fvisibility-inlines-hidden -fno-rtti -fno-strict-aliasing -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -fvisibility=hidden -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/include -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -march=pentium4 -pipe -O2 -MT DerivedSources/libWebCore_la-CSSGrammar.lo -MD -MP -MF DerivedSources/.deps/libWebCore_la-CSSGrammar.Tpo -c -o DerivedSources/libWebCore_la-CSSGrammar.lo `test -f 'DerivedSources/CSSGrammar.cpp' || echo './'`DerivedSources/CSSGrammar.cpp make[1]: Leaving directory `/usr/src/WebKit-r39007' WebCore/css/CSSGrammar.y: In function 'int cssyyparse(void*)': WebCore/css/CSSGrammar.y:1360: error: expected `;' before '}' token WebCore/css/CSSGrammar.y:1361: error: expected `;' before '}' token WebCore/css/CSSGrammar.y:1363: error: expected `;' before '}' token make[1]: *** [DerivedSources/libWebCore_la-CSSGrammar.lo] Error 1 make: *** [all] Error 2
The patch works fine here (Ark Linux, building webkit-qt), both with bison 2.4 and 2.3.
Double checked the patch and still getting the error with bison 2.4. Bison 2.3 with no patches works fine. Building webkit-gtk here with Source Mage and gcc 4.3.2.
Created attachment 25831 [details] Updated patch Turns out we're patching some strictness out of bison in Ark -- try the updated patch I'm attaching, that works for me even with stock bison 2.4
The new patch works for me with Source Mage.
(In reply to comment #17) > Created an attachment (id=25831) [review] > Updated patch > > Turns out we're patching some strictness out of bison in Ark -- try the updated > patch I'm attaching, that works for me even with stock bison 2.4 Hey Bero, could you add a ChangeLog and set the review flag?
Forgotten to edit the bug title when I confirmed (sorry for not correcting it earlier).
The updated patch also fixes this issue on Fedora Rawhide. (Applied without change to today's nightly: SVN 39370.)
Created attachment 26129 [details] Updated patch - same as before plus changelog Adding patch with ChangeLog entry, setting review to ?
Comment on attachment 26129 [details] Updated patch - same as before plus changelog Obviously adding the semicolons is fine to do and harmless. I don't understand why you're adding LOWEST_PREC instead of just removing maybe_sgml.
LOWEST_PREC was the idea of the bison guys: http://www.mail-archive.com/bug-bison%40gnu.org/msg01270.html It's there because they probably know their tool better than I do.
LOWEST_PREC is actually necessary, doing the obvious thing and just removing maybe_sgml results in perl /usr/src/ark/BUILD/WebKit/WebCore/css/makegrammar.pl ../../../WebCore/css/CSSGrammar.y tmp/CSSGrammar ../../../WebCore/css/CSSGrammar.y: conflicts: 106 shift/reduce, 6 reduce/reduce ../../../WebCore/css/CSSGrammar.y: expected 49 shift/reduce conflicts ../../../WebCore/css/CSSGrammar.y: expected 0 reduce/reduce conflicts Died at /usr/src/ark/BUILD/WebKit/WebCore/css/makegrammar.pl line 35. make[1]: *** [tmp/CSSGrammar.cpp] Error 2
Comment on attachment 26129 [details] Updated patch - same as before plus changelog r=me
Committed revision 39786.